joyce8/EMBER2024-capa huggingface dataset:
Function at 0x857c44
Capabilities:
Create process on windows

Disassembly:
push ebp
mov ebp, esp
add esp, 0xffffffbc
push ebx
push esi
push edi
mov dword [ebp - 8], ecx
mov dword [ebp - 4], edx
mov ebx, eax
mov eax, dword [ebp - 4]
call fcn.0040b9a8
mov eax, dword [ebp - 8]
call fcn.0040b9a8
xor eax, eax
push ebp
push 0x857d0c
push dword fs:[eax]
mov dword fs:[eax], esp
xor eax, eax
push ebp
push 0x857ce3
push dword fs:[eax]
mov dword fs:[eax], esp
lea eax, [ebp - 0x44]
xor ecx, ecx
mov edx, 0x3c
call fcn.00408280
mov dword [ebp - 0x44], 0x3c
mov dword [ebp - 0x3c], ebx
mov dword [ebp - 0x40], 0x500
mov eax, 0x857d1c
mov dword [ebp - 0x38], eax
mov eax, dword [ebp - 4]
call fcn.0040c824
mov dword [ebp - 0x34], eax
cmp dword [ebp - 8], 0
je 0x857cc5
mov eax, dword [ebp - 8]
call fcn.0040c824
mov dword [ebp - 0x30], eax
xor eax, eax
mov dword [ebp - 0x28], eax
lea eax, [ebp - 0x44]
push eax
call sub.shell32.dll_ShellExecuteExW
cmp eax, 1
sbb ebx, ebx
inc ebx
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
jmp 0x857cef
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x857d13
lea eax, [ebp - 8]
mov edx, 2
call fcn.0040b914
pop eax
jmp eax

Function at 0x85c1f0
Capabilities:
Allocate or change rwx memory

Disassembly:
push ebx
push esi
push edi
push ebp
mov edi, ecx
mov esi, edx
mov ebx, eax
test esi, esi
je 0x85c202
test edi, edi
jne 0x85c216
mov ecx, 0x3e3
mov edx, 0x85c274
mov eax, 0x85c2f0
call fcn.0040b700
push 0x40
push 0x1000
push 0x20
push 0
call sub.kernel32.dll_VirtualAlloc
mov ebp, eax
mov eax, dword [ebx]
xor ecx, ecx
mov edx, esi
call fcn.0085c314
mov esi, eax
mov eax, dword [ebx]
xor ecx, ecx
mov edx, edi
call fcn.0085c314
mov edi, eax
push edi
mov ecx, ebp
mov edx, esi
mov eax, ebx
call fcn.0085c40c
test al, al
jne 0x85c261
push 0x8000
push 0x20
push ebp
call sub.kernel32.dll_VirtualFree
xor ebp, ebp
mov eax, ebp
pop ebp
pop edi
pop esi
pop ebx
ret
Function at 0x89501c
Capabilities:
Shutdown system

Disassembly:
push ebx
add esp, 0xffffffe8
mov ebx, eax
call fcn.00439d54
cmp eax, 2
jne 0x895084
lea eax, [esp + 4]
push eax
push 0x20
call sub.kernel32.dll_GetCurrentProcess
push eax
call sub.advapi32.dll_OpenProcessToken
lea eax, [esp + 0xc]
push eax
push 0x895094
push 0
call sub.advapi32.dll_LookupPrivilegeValueW
mov dword [esp + 8], 1
mov dword [esp + 0x14], 2
xor eax, eax
mov dword [esp], eax
push esp
push 0
push 0
lea eax, [esp + 0x14]
push eax
push 0
mov eax, dword [esp + 0x18]
push eax
call sub.advapi32.dll_AdjustTokenPrivileges
mov eax, dword [esp + 4]
push eax
call sub.kernel32.dll_CloseHandle
push 0
push ebx
call sub.user32.dll_ExitWindowsEx
add esp, 0x18
pop ebx
ret
Function at 0x897eec
Capabilities:
Create process on windows

Disassembly:
push ebp
mov ebp, esp
add esp, 0xffffffb4
push ebx
push esi
push edi
xor edx, edx
mov dword [ebp - 4], edx
mov dword [ebp - 8], edx
mov dword [ebp - 0xc], eax
xor eax, eax
push ebp
push 0x8980c2
push dword fs:[eax]
mov dword fs:[eax], esp
xor eax, eax
mov dword [ebp - 0x10], eax
mov eax, dword [ebp - 0xc]
mov edx, 0x8980dc
call fcn.0040cc24
jne 0x897f59
cmp dword [ebp - 0x10], 0x20
jae 0x897f59
xor eax, eax
push ebp
push 0x897f4f
push dword fs:[eax]
mov dword fs:[eax], esp
push 5
push 0x8980f0
call sub.kernel32.dll_WinExec
mov dword [ebp - 0x10], eax
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
jmp 0x897f59
cmp dword [ebp - 0x10], 0x20
jae 0x897fcc
lea eax, [ebp - 8]
mov edx, 0x898124
call fcn.0040bd94
mov eax, dword [ebp - 0xc]
mov edx, 0x8980dc
call fcn.0040cc24
jne 0x897f8a
lea eax, [ebp - 8]
mov edx, 0x898144
call fcn.0040c0e8
jmp 0x897f97
lea eax, [ebp - 8]
mov edx, 0x898164
call fcn.0040c0e8
xor eax, eax
push ebp
push 0x897fc2
push dword fs:[eax]
mov dword fs:[eax], esp
push 5
mov eax, dword [ebp - 8]
call fcn.0040c30c
push eax
call sub.kernel32.dll_WinExec
mov dword [ebp - 0x10], eax
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
jmp 0x897fcc
cmp dword [ebp - 0x10], 0x20
jae 0x89803a
lea eax, [ebp - 4]
mov edx, 0x898184
call fcn.0040bcec
mov eax, dword [ebp - 0xc]
mov edx, 0x8980dc
call fcn.0040cc24
jne 0x897ffd
lea eax, [ebp - 4]
mov edx, 0x8981b4
call fcn.0040ca34
jmp 0x89800a
lea eax, [ebp - 4]
mov edx, 0x8981e8
call fcn.0040ca34
xor eax, eax
push ebp
push 0x898030
push dword fs:[eax]
mov dword fs:[eax], esp
push 5
mov eax, dword [ebp - 4]
push eax
call sub.kernel32.dll_WinExec
mov dword [ebp - 0x10], eax
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
jmp 0x89803a
cmp dword [ebp - 0x10], 0x20
jae 0x8980a2
mov dword [ebp - 0x4c], 0x3c
xor eax, eax
mov dword [ebp - 0x48], eax
call sub.user32.dll_GetForegroundWindow
mov dword [ebp - 0x44], eax
mov eax, 0x89820c
mov dword [ebp - 0x40], eax
mov eax, 0x898218
mov dword [ebp - 0x3c], eax
mov eax, dword [ebp - 0xc]
mov edx, 0x8980dc
call fcn.0040cc24
jne 0x89807d
mov eax, 0x89823c
mov dword [ebp - 0x38], eax
jmp 0x898085
mov eax, 0x898264
mov dword [ebp - 0x38], eax
mov eax, 0x898288
mov dword [ebp - 0x34], eax
mov dword [ebp - 0x30], 1
xor eax, eax
mov dword [ebp - 0x2c], eax
lea eax, [ebp - 0x4c]
push eax
call sub.shell32.dll_ShellExecuteExW
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x8980c9
lea eax, [ebp - 8]
call fcn.0040b8d8
lea eax, [ebp - 4]
call fcn.0040b8b4
pop eax
jmp eax
Function at 0x8987cc
Capabilities:
Get file version info

Disassembly:
push ebp
mov ebp, esp
add esp, 0xffffffc4
push ebx
push esi
push edi
xor ecx, ecx
mov dword [ebp - 0x1c], ecx
mov dword [ebp - 4], edx
mov esi, eax
xor eax, eax
push ebp
push 0x8988dc
push dword fs:[eax]
mov dword fs:[eax], esp
mov eax, esi
test eax, eax
je 0x8987f6
mov eax, dword [eax - 4]
inc eax
call fcn.00431920
mov ebx, eax
mov edx, esi
mov eax, ebx
call fcn.00431660
lea eax, [ebp - 8]
push eax
push ebx
call sub.version.dll_GetFileVersionInfoSizeW
mov esi, eax
mov eax, dword [ebp - 4]
call fcn.0040b8b4
test esi, esi
jle 0x8988bd
lea eax, [esi + 1]
call fcn.00431920
mov edi, eax
push edi
push esi
mov eax, dword [ebp - 8]
push eax
push ebx
call sub.version.dll_GetFileVersionInfoW
test eax, eax
je 0x8988b6
lea eax, [ebp - 0x10]
push eax
lea eax, [ebp - 0xc]
push eax
push 0x8988ec
push edi
call sub.version.dll_VerQueryValueW
mov esi, dword [ebp - 0xc]
mov eax, dword [esi + 8]
mov dword [ebp - 0x14], eax
mov eax, dword [esi + 0xc]
mov dword [ebp - 0x18], eax
lea eax, [ebp - 0x1c]
push eax
mov eax, dword [ebp - 0x14]
shr eax, 0x10
movzx eax, ax
mov dword [ebp - 0x3c], eax
mov byte [ebp - 0x38], 0
movzx eax, word [esi + 8]
mov dword [ebp - 0x34], eax
mov byte [ebp - 0x30], 0
mov eax, dword [ebp - 0x18]
shr eax, 0x10
movzx eax, ax
mov dword [ebp - 0x2c], eax
mov byte [ebp - 0x28], 0
movzx eax, word [esi + 0xc]
mov dword [ebp - 0x24], eax
mov byte [ebp - 0x20], 0
lea edx, [ebp - 0x3c]
mov ecx, 3
mov eax, 0x8988fc
call fcn.00431adc
mov edx, dword [ebp - 0x1c]
mov eax, dword [ebp - 4]
call fcn.0040bca4
mov eax, edi
call fcn.00431960
mov eax, ebx
call fcn.00431960
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x8988e3
lea eax, [ebp - 0x1c]
call fcn.0040b8b4
pop eax
jmp eax
Function at 0x8a2168
Capabilities:
Hide graphical window

Disassembly:
push ebp
mov ebp, esp
push ebx
push esi
push edi
mov ebx, eax
xor eax, eax
push ebp
push 0x8a222e
push dword fs:[eax]
mov dword fs:[eax], esp
mov eax, dword [0x8dd1a4]
cmp byte [eax], 0
jne 0x8a21f8
mov byte [0x1578de4], 0
mov eax, ebx
call fcn.005e3b84
xor edx, edx
mov eax, ebx
call fcn.005df6ac
mov eax, dword [0x8dd49c]
mov eax, dword [eax]
call fcn.005e857c
mov al, 1
call fcn.00855c60
mov eax, dword [0x8dd278]
cmp dword [eax], 0
je 0x8a21ea
mov eax, dword [0x8dd278]
mov eax, dword [eax]
cmp byte [eax + 0x2f6], 1
jne 0x8a21ea
mov eax, dword [0x8dd1a4]
cmp byte [eax], 0
jne 0x8a21ea
push 9
mov eax, dword [0x8dd278]
mov eax, dword [eax]
call fcn.0053ed74
push eax
call sub.user32.dll_ShowWindow
mov eax, dword [0x8dd49c]
mov eax, dword [eax]
call fcn.005e8ba0
jmp 0x8a2224
xor eax, eax
call fcn.00855c60
mov eax, ebx
call fcn.005e3b7c
mov dl, 1
mov eax, ebx
call fcn.005df6ac
push 0
mov eax, dword [0x8dd49c]
mov eax, dword [eax]
mov eax, dword [eax + 0x190]
push eax
call sub.user32.dll_ShowWindow
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
jmp 0x8a2238
pop edi
pop esi
pop ebx
pop ebp
ret

Function at 0x8a2df4
Capabilities:
Hide graphical window

Disassembly:
push ebp
mov ebp, esp
push ebx
push esi
push edi
mov ebx, eax
xor eax, eax
push ebp
push 0x8a2ea0
push dword fs:[eax]
mov dword fs:[eax], esp
mov byte [0x1578de4], 1
mov eax, dword [0x8dd1a4]
cmp byte [eax], 0
jne 0x8a2e71
cmp byte [0x1578de4], 1
jne 0x8a2e63
mov eax, ebx
call fcn.005e3b7c
mov dl, 1
mov eax, ebx
call fcn.005df6ac
push 0
mov eax, dword [0x8dd49c]
mov eax, dword [eax]
mov eax, dword [eax + 0x190]
push eax
call sub.user32.dll_ShowWindow
mov eax, dword [0x8dd684]
cmp byte [eax], 0
jne 0x8a2e5a
mov al, 1
call fcn.00855c60
mov byte [0x1578df4], 1
jmp 0x8a2e96
mov dl, 1
mov eax, dword [0x1578d48]
call fcn.005df6ac
jmp 0x8a2e96
mov eax, ebx
call fcn.005e3b7c
mov dl, 1
mov eax, ebx
call fcn.005df6ac
push 0
mov eax, dword [0x8dd49c]
mov eax, dword [eax]
mov eax, dword [eax + 0x190]
push eax
call sub.user32.dll_ShowWindow
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
jmp 0x8a2eaa
pop edi
pop esi
pop ebx
pop ebp
ret

Function at 0x8a6f68
Capabilities:
Encode data using xor

Disassembly:
push ebx
push esi
push edi
push ebp
push ecx
mov ebp, edx
mov dword [esp], eax
mov si, 3
mov ebx, dword [esp]
mov eax, ebx
test eax, eax
je 0x8a6f82
mov eax, dword [eax - 4]
mov edx, ebp
xor ecx, ecx
xchg edx, eax
call fcn.0040c438
mov eax, ebx
test eax, eax
je 0x8a6f95
mov eax, dword [eax - 4]
mov edi, eax
test edi, edi
jle 0x8a6fcf
mov ebx, 1
mov eax, ebp
call fcn.0040be88
mov edx, dword [esp]
movzx edx, byte [edx + ebx - 1]
movzx ecx, si
shr ecx, 8
xor dl, cl
mov byte [eax + ebx - 1], dl
mov eax, dword [ebp]
movzx eax, byte [eax + ebx - 1]
add si, ax
lea eax, [esi + esi*2]
mov esi, eax
inc ebx
dec edi
jne 0x8a6fa0
pop edx
pop ebp
pop edi
pop esi
pop ebx
ret
Function at 0x8a6fd8
Capabilities:
Encode data using xor
Encrypt data using rc4 prga

Disassembly:
push ebx
push esi
push edi
push ebp
add esp, 0xfffffff8
mov ebp, ecx
mov dword [esp + 4], edx
mov word [esp], ax
movzx esi, word [esp]
mov ebx, dword [esp + 4]
mov eax, ebx
test eax, eax
je 0x8a6ffa
mov eax, dword [eax - 4]
mov edx, ebp
xor ecx, ecx
xchg edx, eax
call fcn.0040c438
mov eax, ebx
test eax, eax
je 0x8a700d
mov eax, dword [eax - 4]
mov edi, eax
test edi, edi
jle 0x8a7048
mov ebx, 1
mov eax, ebp
call fcn.0040be88
mov edx, dword [esp + 4]
movzx edx, byte [edx + ebx - 1]
movzx ecx, si
shr ecx, 8
xor dl, cl
mov byte [eax + ebx - 1], dl
mov eax, dword [ebp]
movzx eax, byte [eax + ebx - 1]
add si, ax
imul si, word [esp]
inc ebx
dec edi
jne 0x8a7018
pop ecx
pop edx
pop ebp
pop edi
pop esi
pop ebx
ret

Function at 0x8af6ac
Capabilities:
Query service status

Disassembly:
push ebx
push esi
push edi
push ebp
add esp, 0xffffffe4
xor ebx, ebx
push 0xf003f
push 0
push 0
call sub.advapi32.dll_OpenSCManagerW
mov edi, eax
test edi, edi
je 0x8af6fe
push 0xf01ff
push 0x8af708
mov ebp, edi
push ebp
call sub.advapi32.dll_OpenServiceW
mov esi, eax
test esi, esi
je 0x8af6f8
push esp
mov ebx, esi
push ebx
call sub.advapi32.dll_QueryServiceStatus
push ebx
call sub.advapi32.dll_CloseServiceHandle
cmp dword [esp + 4], 4
sete bl
push ebp
call sub.advapi32.dll_CloseServiceHandle
mov eax, ebx
add esp, 0x1c
pop ebp
pop edi
pop esi
pop ebx
ret
Function at 0x8af728
Capabilities:
Get session user name

Disassembly:
push ebp
mov ebp, esp
add esp, 0xffffffe0
push ebx
xor eax, eax
mov dword [ebp - 4], eax
mov dword [ebp - 8], eax
mov dword [ebp - 0xc], eax
xor eax, eax
push ebp
push 0x8af8c6
push dword fs:[eax]
mov dword fs:[eax], esp
mov byte [ebp - 0xd], 0
call fcn.0075317c
test al, al
jne 0x8af8a9
push 0xf003f
push 0
push 0
call sub.advapi32.dll_OpenSCManagerW
mov dword [ebp - 0x14], eax
cmp dword [ebp - 0x14], 0
je 0x8af842
push 0xf01ff
push 0x8af8d8
mov eax, dword [ebp - 0x14]
push eax
call sub.advapi32.dll_OpenServiceW
mov dword [ebp - 0x18], eax
cmp dword [ebp - 0x18], 0
setne byte [ebp - 0xd]
cmp byte [ebp - 0xd], 0
je 0x8af839
lea eax, [ebp - 0x20]
push eax
push 0
push 0
mov ebx, dword [ebp - 0x18]
push ebx
call sub.advapi32.dll_QueryServiceConfigW
mov eax, dword [ebp - 0x20]
call fcn.0040712c
mov dword [ebp - 0x1c], eax
xor eax, eax
push ebp
push 0x8af829
push dword fs:[eax]
mov dword fs:[eax], esp
lea eax, [ebp - 0x20]
push eax
mov eax, dword [ebp - 0x20]
push eax
mov eax, dword [ebp - 0x1c]
push eax
push ebx
call sub.advapi32.dll_QueryServiceConfigW
lea eax, [ebp - 8]
mov edx, dword [ebp - 0x1c]
mov edx, dword [edx + 0x1c]
call fcn.0040c884
mov edx, 0x8af904
mov eax, dword [ebp - 8]
call fcn.0042f86c
test eax, eax
jne 0x8af811
lea eax, [ebp - 8]
mov edx, 0x8af928
call fcn.0040bcec
lea eax, [ebp - 0xc]
mov edx, 0x8af944
call fcn.0040bcec
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x8af830
mov eax, dword [ebp - 0x1c]
call fcn.0040717c
pop eax
jmp eax
mov eax, dword [ebp - 0x14]
push eax
call sub.advapi32.dll_CloseServiceHandle
cmp byte [ebp - 0xd], 0
je 0x8af8a9
mov dword [ebp - 0x20], pe_nt_image_headers32
lea eax, [ebp - 4]
mov edx, dword [ebp - 0x20]
call fcn.0040c9b0
lea eax, [ebp - 0x20]
push eax
mov eax, dword [ebp - 4]
call fcn.0040c824
push eax
call sub.advapi32.dll_GetUserNameW
mov eax, dword [ebp - 4]
call fcn.0040c824
call fcn.0040bde4
lea edx, [ebp - 4]
xchg edx, eax
call fcn.0040c9b0
mov edx, dword [ebp - 8]
mov eax, dword [ebp - 4]
call fcn.0042f86c
test eax, eax
je 0x8af8a4
mov edx, dword [ebp - 0xc]
mov eax, dword [ebp - 4]
call fcn.0042f86c
test eax, eax
je 0x8af8a4
xor eax, eax
jmp 0x8af8a6
mov al, 1
mov byte [ebp - 0xd], al
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x8af8cd
lea eax, [ebp - 0xc]
mov edx, 3
call fcn.0040b914
pop eax
jmp eax
Function at 0x401460
Capabilities:
Encode data using xor
Extract resource via kernel32 functions

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x4d4
mov eax, dword [0x406040]
xor eax, esp
mov dword [esp + 0x4d0], eax
push ebx
push esi
push edi
push 0xa
push 0xa
push 0
call dword [sym.imp.KERNEL32.dll_FindResourceA]
mov esi, eax
push esi
push 0
call dword [sym.imp.KERNEL32.dll_LoadResource]
push esi
push 0
mov dword [esp + 0x14], eax
call dword [sym.imp.KERNEL32.dll_SizeofResource]
mov ebx, dword [0x406628]
mov edi, eax
mov edx, dword [0x406624]
mov ecx, ebx
sub ecx, edx
cmp edi, ecx
jae 0x4014c2
lea ecx, [edx + edi]
mov dword [0x406628], ecx
jmp 0x4014f0
jbe 0x4014f0
mov eax, dword [0x40662c]
sub eax, edx
cmp edi, eax
jbe 0x4014d8
push ecx
push edi
call fcn.00402780
jmp 0x4014f0
mov esi, edi
sub esi, ecx
push esi
push 0
push ebx
call sub.VCRUNTIME140.dll_memset
lea eax, [esi + ebx]
add esp, 0xc
mov dword [0x406628], eax
push edi
push dword [esp + 0x10]
push dword [0x406624]
call sub.VCRUNTIME140.dll_memcpy
mov edx, dword [0x406628]
add esp, 0xc
movsx eax, byte [edx - 1]
sub eax, 0x31
je 0x401591
mov esi, dword [0x406624]
sub eax, 1
jne 0x4015ef
mov eax, dword [0x40430c]
xorps xmm0, xmm0
mov dword [esp + 0x10], eax
xor ecx, ecx
mov ax, word [0x404310]
mov word [esp + 0x14], ax
mov al, byte [0x404312]
movlpd qword [esp + 0x18], xmm0
mov dword [esp + 0x20], 7
mov dword [esp + 0x24], 0xf
mov byte [esp + 0x16], al
mov byte [esp + 0x17], 0
sub edx, esi
je 0x4015ef
mov edi, 7
nop dword [eax + eax]
mov eax, ecx
xor edx, edx
div edi
mov al, byte [esp + edx + 0x10]
xor byte [ecx + esi], al
inc ecx
mov eax, dword [0x406628]
mov esi, dword [0x406624]
sub eax, esi
cmp ecx, eax
jne 0x401570
jmp 0x4015ef
push 0xb0
lea eax, [esp + 0x2c]
push 0
push eax
call sub.VCRUNTIME140.dll_memset
push ecx
lea ecx, [esp + 0x38]
call fcn.00402190
mov eax, dword [esp + 0x28]
mov eax, dword [eax + 4]
mov dword [esp + eax + 0x28], vtable.std::basic_ofstream_char__struct_std::char_traits_char__.0
mov eax, dword [esp + 0x28]
mov ecx, dword [eax + 4]
lea eax, [ecx - 0x68]
mov dword [esp + ecx + 0x24], eax
lea ecx, [esp + 0x2c]
call fcn.004020b0
lea ecx, [esp + 0x30]
call dword [sym.imp.MSVCP140.dll_public_virtual:_void___thiscall_std::basic_ostream_char__struct_std::char_traits_char__::destructor_void_]
lea ecx, [esp + 0x90]
call dword [sym.imp.MSVCP140.dll_public_virtual:_void___thiscall_std::basic_ios_char__struct_std::char_traits_char__::destructor_void_]
mov esi, dword [0x406624]
test esi, esi
je 0x401616
push 0x400
lea eax, [esp + 0xdc]
push eax
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
mov edx, esi
lea ecx, [esp + 0xd8]
call fcn.00401230
mov ecx, dword [esp + 0x4dc]
xor eax, eax
pop edi
pop esi
pop ebx
xor ecx, esp
call fcn.0040294e
mov esp, ebp
pop ebp
ret 0x10
Function at 0x4019a0
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x1c
push ebx
mov ebx, ecx
push esi
push edi
cmp dword [ebx + 0x38], 0
je 0x4019cc
push dword [ebp + 0x10]
push dword [ebp + 0xc]
push dword [ebp + 8]
call dword [sym.imp.MSVCP140.dll_protected_virtual:_long_long___int64____thiscall_std::basic_streambuf_char__struct_std::char_traits_char__::xsputn_char_const___long_long___int64__]
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0xc
mov eax, dword [ebx + 0x20]
mov esi, dword [ebp + 0xc]
mov edi, dword [ebp + 0x10]
mov dword [esp + 0x20], esi
mov ecx, dword [eax]
lea eax, [ebx + 0x30]
mov dword [esp + 0x24], edi
mov dword [esp + 0x1c], ecx
mov dword [esp + 0x18], eax
test ecx, ecx
je 0x4019f4
mov eax, dword [eax]
mov ecx, dword [eax]
jmp 0x4019fa
xor ecx, ecx
mov dword [esp + 0x18], eax
mov eax, ecx
cdq
mov dword [esp + 0x10], eax
mov ecx, edx
mov dword [esp + 0x14], ecx
test edi, edi
jl 0x401a84
jg 0x401a11
test esi, esi
je 0x401a84
test ecx, ecx
jl 0x401a67
jg 0x401a1b
test eax, eax
je 0x401a67
cmp edi, ecx
jg 0x401a2f
jl 0x401a25
cmp esi, eax
jae 0x401a2f
mov eax, esi
mov dword [esp + 0x10], esi
mov dword [esp + 0x14], edi
push eax
push dword [ebp + 8]
push dword [esp + 0x24]
call sub.VCRUNTIME140.dll_memcpy
mov eax, dword [esp + 0x24]
add esp, 0xc
mov ecx, dword [esp + 0x10]
mov edx, dword [ebp + 8]
add edx, ecx
sub esi, ecx
mov eax, dword [eax]
sbb edi, dword [esp + 0x14]
sub dword [eax], ecx
mov eax, dword [ebx + 0x20]
add dword [eax], ecx
test edi, edi
jl 0x401a84
jg 0x401a6a
test esi, esi
je 0x401a84
jmp 0x401a6a
mov edx, dword [ebp + 8]
mov eax, dword [ebx + 0x4c]
test eax, eax
je 0x401a84
push eax
push esi
push 1
push edx
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fwrite]
add esp, 0x10
sub esi, eax
sbb edi, 0
mov eax, dword [esp + 0x20]
mov edx, dword [esp + 0x24]
sub eax, esi
sbb edx, edi
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0xc
Function at 0x401aa0
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xc
mov eax, dword [ebp + 0x10]
push ebx
mov ebx, ecx
mov ecx, dword [ebp + 0xc]
push esi
mov esi, dword [ebp + 8]
mov dword [ebp - 4], esi
test eax, eax
jg 0x401acc
jl 0x401ac0
test ecx, ecx
jne 0x401acc
pop esi
xor eax, eax
xor edx, edx
pop ebx
mov esp, ebp
pop ebp
ret 0xc
cmp dword [ebx + 0x38], 0
je 0x401ae5
push eax
push ecx
push esi
mov ecx, ebx
call dword [sym.imp.MSVCP140.dll_protected_virtual:_long_long___int64____thiscall_std::basic_streambuf_char__struct_std::char_traits_char__::xsgetn_char___long_long___int64__]
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0xc
mov eax, dword [ebx + 0x1c]
push edi
mov edi, ecx
mov eax, dword [eax]
mov dword [ebp - 8], eax
test eax, eax
je 0x401b33
mov eax, dword [ebx + 0x2c]
lea edx, [ebx + 0x2c]
mov dword [ebp - 0xc], edx
mov eax, dword [eax]
test eax, eax
je 0x401b39
mov edi, dword [ebp - 4]
cmp eax, ecx
mov esi, ecx
cmovb esi, eax
push esi
push dword [ebp - 8]
push edi
call sub.VCRUNTIME140.dll_memcpy
mov eax, dword [ebx + 0x2c]
add edi, esi
mov dword [ebp - 4], edi
add esp, 0xc
mov edi, dword [ebp + 0xc]
sub edi, esi
sub dword [eax], esi
mov eax, dword [ebx + 0x1c]
add dword [eax], esi
mov esi, dword [ebp - 4]
jmp 0x401b39
lea eax, [ebx + 0x2c]
mov dword [ebp - 0xc], eax
cmp dword [ebx + 0x4c], 0
je 0x401ba6
mov ecx, dword [ebx + 0xc]
lea eax, [ebx + 0x3c]
cmp dword [ecx], eax
jne 0x401b62
mov eax, dword [ebx + 0xc]
mov edx, dword [ebx + 0x54]
mov ecx, dword [ebx + 0x50]
sub edx, ecx
mov dword [eax], ecx
mov eax, dword [ebx + 0x1c]
mov dword [eax], ecx
mov eax, dword [ebp - 0xc]
mov eax, dword [eax]
mov dword [eax], edx
mov eax, dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fread]
cmp edi, 0xfff
jbe 0x401b94
nop
push dword [ebx + 0x4c]
push 0xfff
push 1
push esi
call eax
add esp, 0x10
add esi, eax
sub edi, eax
cmp eax, 0xfff
jne 0x401ba6
cmp edi, eax
mov eax, dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fread]
ja 0x401b70
test edi, edi
je 0x401ba6
push dword [ebx + 0x4c]
push edi
push 1
push esi
call eax
add esp, 0x10
sub edi, eax
mov eax, dword [ebp + 0xc]
mov edx, dword [ebp + 0x10]
sub eax, edi
pop edi
pop esi
sbb edx, 0
pop ebx
mov esp, ebp
pop ebp
ret 0xc
Function at 0x401f30
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x30
mov eax, dword [0x406040]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
mov ebx, dword [ebp + 8]
push esi
mov esi, ecx
cmp ebx, 0xffffffff
jne 0x401f60
pop esi
xor eax, eax
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0040294e
mov esp, ebp
pop ebp
ret 4
mov eax, dword [esi + 0x20]
push edi
mov ecx, dword [eax]
test ecx, ecx
je 0x401f9c
mov edx, dword [esi + 0x30]
mov edi, dword [edx]
lea eax, [edi + ecx]
cmp ecx, eax
jae 0x401f9c
lea ecx, [edi - 1]
mov eax, ebx
mov dword [edx], ecx
mov edx, dword [esi + 0x20]
pop edi
mov esi, dword [edx]
lea ecx, [esi + 1]
mov dword [edx], ecx
mov byte [esi], bl
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0040294e
mov esp, ebp
pop ebp
ret 4
cmp dword [esi + 0x4c], 0
je 0x402073
mov edi, dword [esi + 0xc]
lea eax, [esi + 0x3c]
cmp dword [edi], eax
jne 0x401fc4
mov edx, dword [esi + 0x54]
mov ecx, dword [esi + 0x50]
sub edx, ecx
mov dword [edi], ecx
mov eax, dword [esi + 0x1c]
mov dword [eax], ecx
mov eax, dword [esi + 0x2c]
mov dword [eax], edx
mov ecx, dword [esi + 0x38]
test ecx, ecx
jne 0x401fd0
movsx eax, bl
jmp 0x402008
lea eax, [ebp - 0x2c]
mov byte [ebp - 0x25], bl
push eax
lea eax, [ebp - 4]
push eax
lea eax, [ebp - 0x24]
push eax
lea eax, [ebp - 0x30]
push eax
lea eax, [ebp - 0x24]
push eax
lea eax, [ebp - 0x25]
push eax
lea eax, [esi + 0x40]
push eax
call dword [sym.imp.MSVCP140.dll_public:_int___thiscall_std::codecvt_char__char__struct__Mbstatet_::out_struct__Mbstatet___char_const___char_const___char_const____char___char___char___const]
sub eax, 0
je 0x402032
sub eax, 1
je 0x402032
sub eax, 2
jne 0x402073
movsx eax, byte [ebp - 0x25]
push dword [esi + 0x4c]
push eax
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fputc]
add esp, 8
or ecx, 0xffffffff
cmp eax, ecx
cmove ebx, ecx
pop edi
pop esi
mov eax, ebx
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0040294e
mov esp, ebp
pop ebp
ret 4
mov edi, dword [ebp - 0x2c]
lea eax, [ebp - 0x24]
sub edi, eax
je 0x402050
push dword [esi + 0x4c]
push edi
push 1
push eax
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fwrite]
add esp, 0x10
cmp edi, eax
jne 0x402073
lea ecx, [ebp - 0x25]
mov byte [esi + 0x3d], 1
or eax, 0xffffffff
cmp dword [ebp - 0x30], ecx
pop edi
pop esi
cmovne eax, ebx
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0040294e
mov esp, ebp
pop ebp
ret 4
mov ecx, dword [ebp - 4]
or eax, 0xffffffff
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.0040294e
mov esp, ebp
pop ebp
ret 4