joyce8/EMBER2024-capa huggingface dataset:
Function at 0x405d9a
Capabilities:
Encode data using xor
Hash data with crc32

Disassembly:
cmp dword [0x42c574], 0
push esi
jne 0x405dd1
xor ecx, ecx
push 8
mov eax, ecx
pop esi
mov edx, eax
and dl, 1
neg dl
sbb edx, edx
and edx, 0xedb88320
shr eax, 1
xor eax, edx
dec esi
jne 0x405dab
mov dword [ecx*4 + 0x42c570], eax
inc ecx
cmp ecx, 0x100
jl 0x405da6
mov edx, dword [esp + 0x10]
mov eax, dword [esp + 8]
test edx, edx
not eax
jbe 0x405e02
mov ecx, dword [esp + 0xc]
push edi
movzx edi, byte [ecx]
mov esi, eax
and esi, 0xff
xor esi, edi
shr eax, 8
mov esi, dword [esi*4 + 0x42c570]
xor eax, esi
inc ecx
dec edx
jne 0x405de4
pop edi
not eax
pop esi
ret 0xc

Function at 0x401000
Capabilities:
Allocate or change rwx memory

Disassembly:
push ebx
push ecx
push edx
push esi
enter 0x84, 0
sub ebp, 0x82
mov dword [ebp - 2], 0
call fcn.004014da
mov ebx, eax
xor eax, eax
mov dword [ebp + 0x7e], eax
lea eax, [ebp + 0x7e]
push eax
mov eax, ebx
or al, 0x40
push eax
mov eax, 0x401d8d
sub eax, fcn.00401558
push eax
push fcn.00401558
call dword [sym.imp.KERNEL32.DLL_VirtualProtect]
cmp dword [ebp + 0x7e], 0
je 0x401081
mov eax, ebx
lea edx, [ebp - 2]
call fcn.0040141a
mov eax, ebx
lea ecx, [ebx + 0x1b600]
call fcn.00401461
mov esi, ecx
mov eax, ebx
or si, 1
cdq
idiv esi
lea edx, [eax + ecx]
mov eax, ebx
mov ecx, 0x40b054
sar eax, 2
sub ecx, eax
lea ebx, [ebp - 2]
mov eax, ecx
call fcn.00401558
xor eax, eax
lea esp, [ebp + 0x82]
pop ebp
pop esi
pop edx
pop ecx
pop ebx
ret

Function at 0x4014da
Capabilities:
Delete file
Encode data using base64 via winapi
Get common file path

Disassembly:
push ecx
push edx
enter 0x220, 0
lea eax, [ebp - 0xc]
push eax
call dword [sym.imp.USER32.DLL_GetCursorPos]
push 0x104
lea eax, [ebp - 0x11c]
push eax
call dword [sym.imp.KERNEL32.DLL_GetSystemDirectoryA]
call dword [sym.imp.KERNEL32.DLL_GetTickCount]
lea eax, [ebp - 0x220]
push eax
mov dword [ebp - 4], 0xa
mov byte [ebp - 0x220], 0
call dword [sym.imp.KERNEL32.DLL_DeleteFileA]
lea eax, [ebp - 4]
push eax
lea eax, [ebp - 0x18]
push eax
push 1
push 1
lea eax, [ebp - 0x220]
push eax
call dword [sym.imp.CRYPT32.DLL_CryptBinaryToStringA]
movzx eax, byte [ebp - 0x18]
sub eax, 0x41
leave
pop edx
pop ecx
ret
Function at 0x401000
Capabilities:
Terminate process

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x800
cmp dword [ebp + 0xc], 0
push esi
push edi
mov edi, 0x40d0bc
je 0x40103d
lea eax, [ebp - 0x400]
push 0x400
push eax
push dword [ebp + 0xc]
call fcn.0040109c
add esp, 0xc
lea eax, [ebp - 0x400]
push edi
push eax
call dword [sym.imp.KERNEL32.dll_lstrcatA]
jmp 0x40104f
lea eax, [ebp - 0x400]
push 0x410940
push eax
call dword [sym.imp.KERNEL32.dll_lstrcpyA]
lea eax, [ebp - 0x400]
push eax
lea eax, [ebp - 0x800]
push dword [ebp + 8]
push str.A_fatal_application_error_has_occurred._n_n_s_n___s_nThe_update_will_be_aborted._nPress_any_key_to_continue..
push eax
call dword [sym.imp.USER32.dll_wsprintfA]
add esp, 0x10
mov esi, 0x40dd70
lea eax, [ebp - 0x800]
push esi
push eax
call fcn.00407600
pop ecx
pop ecx
call fcn.0040bb40
push esi
push edi
call fcn.00407600
pop ecx
pop ecx
push 1
call dword [sym.imp.KERNEL32.dll_ExitProcess]

Function at 0x40120d
Capabilities:
Set current directory

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x104
push 1
lea eax, [ebp - 0x104]
push 0x104
push eax
call fcn.004018ca
add esp, 0xc
lea eax, [ebp - 0x104]
push eax
call dword [sym.imp.KERNEL32.dll_SetCurrentDirectoryA]
leave
ret
Function at 0x40192b
Capabilities:
Get common file path

Disassembly:
push esi
mov esi, dword [esp + 8]
push dword [esp + 0xc]
push esi
call dword [sym.imp.KERNEL32.dll_GetSystemDirectoryA]
xor ecx, ecx
cmp eax, ecx
je 0x401954
cmp eax, dword [esp + 0xc]
ja 0x401954
add eax, esi
cmp byte [eax], 0x5c
jne 0x401950
mov byte [eax], cl
mov eax, esi
pop esi
ret
cmp dword [esp + 0x10], ecx
je 0x401967
push ecx
push str.__Unable_to_locate_windows_system_folder
call section..text
pop ecx
pop ecx
xor eax, eax
pop esi
ret

Function at 0x401a1d
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
mov eax, 0x100c
call fcn.00407840
mov eax, dword [ebp + 8]
mov ecx, dword [ebp + 0xc]
neg eax
sbb eax, eax
push ebx
neg ecx
sbb ecx, ecx
push esi
test ecx, eax
push edi
jne 0x401a4b
push 0x57
call fcn.004021e2
jmp 0x401b20
push 1
call fcn.0040163b
pop ecx
xor edi, edi
push edi
push 0x20
push 2
push edi
push edi
push 0x40000000
push dword [ebp + 0xc]
mov dword [ebp - 8], eax
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov ebx, eax
cmp ebx, 0xffffffff
je 0x401a90
lea eax, [ebp - 4]
push 1
push eax
push dword [ebp + 8]
call fcn.00401657
add esp, 0xc
test eax, eax
jne 0x401a9e
push ebx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push dword [ebp - 8]
call fcn.0040163b
pop ecx
jmp 0x401b20
push edi
push dword [ebp - 4]
call fcn.00401748
pop ecx
cmp eax, edi
pop ecx
mov dword [ebp - 0xc], eax
mov dword [ebp + 0xc], eax
jbe 0x401b03
mov esi, 0x1000
cmp dword [ebp + 0xc], esi
jae 0x401ac0
mov esi, dword [ebp + 0xc]
lea eax, [ebp - 0x100c]
push esi
push eax
mov dword [ebp + 8], edi
push dword [ebp - 4]
call fcn.004017de
add esp, 0xc
call fcn.0040164b
test eax, eax
jne 0x401b03
lea eax, [ebp + 8]
push edi
push eax
lea eax, [ebp - 0x100c]
push esi
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_WriteFile]
cmp dword [ebp + 8], 0xffffffff
je 0x401b03
cmp dword [ebp + 8], esi
jne 0x401b03
sub dword [ebp + 0xc], esi
jne 0x401ab3
push dword [ebp - 8]
call fcn.0040163b
pop ecx
push dword [ebp - 4]
call fcn.0040173e
pop ecx
push ebx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
test eax, eax
jne 0x401b24
xor eax, eax
jmp 0x401b35
cmp dword [ebp + 0xc], edi
jbe 0x401b32
cmp dword [ebp - 0xc], edi
je 0x401b32
xor eax, eax
jmp 0x401b35
push 1
pop eax
pop edi
pop esi
pop ebx
leave
ret
Function at 0x401b3a
Capabilities:
Get file size
Read file on windows
Write file on windows

Disassembly:
push ebp
mov ebp, esp
mov eax, 0x100c
call fcn.00407840
mov eax, dword [ebp + 8]
mov ecx, dword [ebp + 0xc]
neg eax
sbb eax, eax
push ebx
neg ecx
sbb ecx, ecx
push esi
test ecx, eax
push edi
jne 0x401b68
push 0x57
call fcn.004021e2
jmp 0x401c36
xor edi, edi
mov esi, dword [sym.imp.KERNEL32.dll_CreateFileA]
push edi
push 0x8000020
push 3
push edi
push 1
push 0x80000000
push dword [ebp + 8]
call esi
mov ebx, eax
cmp ebx, 0xffffffff
je 0x401c36
push edi
push 0x20
push 2
push edi
push edi
push 0x40000000
push dword [ebp + 0xc]
call esi
cmp eax, 0xffffffff
mov dword [ebp + 0xc], eax
jne 0x401bb5
push ebx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
jmp 0x401c36
push edi
push ebx
call dword [sym.imp.KERNEL32.dll_GetFileSize]
cmp eax, edi
mov dword [ebp - 0xc], eax
mov dword [ebp + 8], eax
jbe 0x401c1c
mov esi, 0x1000
cmp dword [ebp + 8], esi
jae 0x401bd4
mov esi, dword [ebp + 8]
lea eax, [ebp - 8]
push edi
push eax
lea eax, [ebp - 0x100c]
push esi
push eax
push ebx
mov dword [ebp - 8], edi
mov dword [ebp - 4], edi
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x401c50
lea eax, [ebp - 4]
push edi
push eax
lea eax, [ebp - 0x100c]
push esi
push eax
push dword [ebp + 0xc]
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x401c50
cmp dword [ebp - 4], 0xffffffff
je 0x401c1c
cmp dword [ebp - 4], esi
jne 0x401c1c
sub dword [ebp + 8], esi
jne 0x401bc7
mov esi, dword [sym.imp.KERNEL32.dll_CloseHandle]
push ebx
call esi
push dword [ebp + 0xc]
test eax, eax
jne 0x401c30
call esi
jmp 0x401c36
call esi
test eax, eax
jne 0x401c3a
xor eax, eax
jmp 0x401c4b
cmp dword [ebp + 8], edi
jbe 0x401c48
cmp dword [ebp - 0xc], edi
je 0x401c48
xor eax, eax
jmp 0x401c4b
push 1
pop eax
pop edi
pop esi
pop ebx
leave
ret
mov esi, dword [sym.imp.KERNEL32.dll_CloseHandle]
push ebx
call esi
push dword [ebp + 0xc]
jmp 0x401c2c
Function at 0x4027fd
Capabilities:
Get system information on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x24
lea eax, [ebp - 0x24]
push eax
call dword [sym.imp.KERNEL32.dll_GetSystemInfo]
push 1
pop eax
cmp dword [ebp - 0x20], eax
mov dword [0x412a90], eax
jbe 0x402826
shl eax, 1
cmp eax, dword [ebp - 0x20]
jb 0x40281a
mov dword [0x412a90], eax
leave
ret

Function at 0x402f9f
Capabilities:
Create thread

Disassembly:
push ecx
cmp dword [0x40d398], 0xffffffff
jne 0x402fde
push esi
xor esi, esi
push esi
push esi
push esi
push esi
call dword [sym.imp.KERNEL32.dll_CreateEventA]
mov dword [0x40d394], eax
lea eax, [esp + 4]
push eax
push esi
push esi
push 0x402fe0
push esi
push esi
call dword [sym.imp.KERNEL32.dll_CreateThread]
mov dword [0x40d398], eax
push 1
push eax
call dword [sym.imp.KERNEL32.dll_SetThreadPriority]
pop esi
pop ecx
ret

Function at 0x403aa7
Capabilities:
Encode data using xor

Disassembly:
shr edx, 2
push esi
mov esi, edx
dec edx
mov eax, 0xeeeeeeee
test esi, esi
je 0x403b01
push edi
lea edi, [edx + 1]
mov edx, dword [esp + 0xc]
push ebx
mov ebx, dword [0x412c1c]
mov esi, edx
and esi, 0xff
add eax, dword [ebx + esi*4 + 0x1000]
lea esi, [eax + edx]
imul eax, eax, 0x21
xor dword [ecx], esi
mov esi, dword [ecx]
add ecx, 4
lea eax, [eax + esi + 3]
mov esi, edx
xor esi, 0x7ff
shl esi, 0x15
add esi, 0x11111111
shr edx, 0xb
or edx, esi
dec edi
jne 0x403ac0
pop ebx
pop edi
pop esi
ret 4
Function at 0x404507
Capabilities:
Get disk information
Get disk size

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x11c
push ebx
push esi
push edi
push 4
lea eax, [ebp - 4]
push ecx
push eax
call fcn.00405013
lea eax, [ebp - 4]
push eax
call dword [sym.imp.KERNEL32.dll_GetDriveTypeA]
mov esi, 0x104
mov ebx, eax
xor edi, edi
push esi
lea eax, [ebp - 0x11c]
push edi
push eax
mov dword [ebp - 0x10], edi
call fcn.004077e0
add esp, 0xc
lea eax, [ebp - 0x11c]
push esi
push eax
lea eax, [ebp - 0x10]
push eax
push edi
push edi
push edi
lea eax, [ebp - 4]
push edi
push eax
call dword [sym.imp.KERNEL32.dll_GetVolumeInformationA]
test eax, eax
je 0x40458e
lea eax, [ebp - 0x14]
mov dword [ebp - 0x18], edi
push eax
lea eax, [ebp - 0xc]
push eax
lea eax, [ebp - 8]
push eax
lea eax, [ebp - 0x18]
push eax
lea eax, [ebp - 4]
push eax
mov dword [ebp - 8], edi
mov dword [ebp - 0xc], edi
mov dword [ebp - 0x14], edi
call dword [sym.imp.KERNEL32.dll_GetDiskFreeSpaceA]
test eax, eax
jne 0x404592
xor eax, eax
jmp 0x4045c2
mov eax, dword [ebp - 0x10]
and eax, 4
xor eax, dword [ebp - 0xc]
xor eax, dword [ebp - 8]
xor eax, dword [ebp - 0x11c]
xor eax, ebx
mov ecx, eax
shr ecx, 0x10
xor ecx, eax
cmp cx, 0x1f00
je 0x4045bf
cmp cx, 0x805
je 0x4045bf
xor eax, eax
jmp 0x4045c2
push 1
pop eax
pop edi
pop esi
pop ebx
leave
ret

Function at 0x405378
Capabilities:
Query or enumerate registry value

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x10c
push ebx
mov ebx, dword [ebp + 0x18]
push esi
push edi
mov edi, 0x104
lea eax, [ebp - 0x10c]
push edi
push eax
push dword [ebp + 8]
xor esi, esi
mov dword [ebp - 4], edx
mov dword [ebp - 8], ecx
mov dword [ebx], esi
call fcn.00405334
lea eax, [ebp - 0x10c]
push edi
push dword [ebp - 8]
push eax
call fcn.004051fc
lea eax, [ebp + 0x18]
push eax
push 0x20019
lea eax, [ebp - 0x10c]
push esi
push eax
mov eax, dword [ebp + 8]
and al, 1
neg al
sbb eax, eax
add eax, 0x80000002
push eax
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
test eax, eax
jne 0x405409
push ebx
mov eax, dword [ebp + 0x14]
push dword [ebp + 0x10]
mov dword [ebx], eax
push dword [ebp + 0xc]
push esi
push dword [ebp - 4]
push dword [ebp + 0x18]
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
mov esi, eax
push dword [ebp + 0x18]
neg esi
sbb esi, esi
inc esi
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov eax, esi
pop edi
pop esi
pop ebx
leave
ret 0x14
Function at 0x407870
Capabilities:
Accept command line arguments

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x40cb40
push 0x4098d8
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
add esp, 0xfffffff0
push ebx
push esi
push edi
mov dword [ebp - 0x18], esp
call dword [sym.imp.KERNEL32.dll_GetVersion]
xor edx, edx
mov dl, ah
mov dword [0x412d90], edx
mov ecx, eax
and ecx, 0xff
mov dword [0x412d8c], ecx
shl ecx, 8
add ecx, edx
mov dword [0x412d88], ecx
shr eax, 0x10
mov dword [0x412d84], eax
call fcn.004097a0
test eax, eax
jne 0x4078da
push 0x1c
call fcn.004079c0
add esp, 4
mov dword [ebp - 4], 0
call fcn.004086a0
call fcn.00409790
call dword [sym.imp.KERNEL32.dll_GetCommandLineA]
mov dword [0x413264], eax
call fcn.00409170
mov dword [0x412d64], eax
test eax, eax
je 0x40790d
mov eax, dword [0x413264]
test eax, eax
jne 0x407917
push 0xffffffffffffffff
call fcn.004089e0
add esp, 4
call fcn.00408ec0
call fcn.00408dd0
call fcn.004089b0
mov eax, dword [0x412da0]
mov dword [0x412da4], eax
push eax
mov eax, dword [0x412d98]
push eax
mov ecx, dword [0x412d94]
push ecx
call fcn.00401155
add esp, 0xc
mov dword [ebp - 0x1c], eax
push eax
call fcn.004089e0
jmp 0x407972
add esp, 4
mov dword [ebp - 4], 0xffffffff
mov ecx, dword [ebp - 0x10]
mov dword fs:[0], ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret

Function at 0x4079c0
Capabilities:
Terminate process

Disassembly:
cmp dword [0x412d6c], 2
je 0x4079ce
call fcn.004099b0
mov eax, dword [esp + 4]
push eax
call fcn.004099f0
add esp, 4
push 0xff
call dword [sym.imp.KERNEL32.dll_ExitProcess]

Function at 0x408a20
Capabilities:
Terminate process

Disassembly:
mov eax, dword [0x412dc0]
push ebx
push ebp
mov ebp, dword [esp + 0xc]
cmp eax, 1
push esi
jne 0x408a3f
push ebp
call dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
push eax
call dword [sym.imp.KERNEL32.dll_TerminateProcess]
mov eax, dword [esp + 0x14]
mov ebx, dword [esp + 0x18]
test eax, eax
mov dword [0x412dbc], 1
mov byte [0x412db8], bl
jne 0x408a99
mov ecx, dword [0x41314c]
test ecx, ecx
je 0x408a87
mov esi, dword [0x413148]
sub esi, 4
cmp esi, ecx
jb 0x408a87
mov eax, dword [esi]
test eax, eax
je 0x408a80
call eax
mov ecx, dword [0x41314c]
sub esi, 4
cmp esi, ecx
jae 0x408a72
push 0x40d044
push 0x40d038
call fcn.00408ad0
add esp, 8
push 0x40d04c
push 0x40d048
call fcn.00408ad0
add esp, 8
test ebx, ebx
jne 0x408ac0
push ebp
mov dword [0x412dc0], 1
call dword [sym.imp.KERNEL32.dll_ExitProcess]
pop esi
pop ebp
pop ebx
ret
Function at 0x409170
Capabilities:
Query environment variable

Disassembly:
mov eax, dword [0x412ed0]
push ebx
push ebp
mov ebp, dword [sym.imp.KERNEL32.dll_GetEnvironmentStrings]
push esi
xor esi, esi
xor ebx, ebx
push edi
mov edi, dword [sym.imp.KERNEL32.dll_GetEnvironmentStringsW]
test eax, eax
jne 0x4091b2
call edi
mov esi, eax
test esi, esi
je 0x40919c
mov eax, 1
jmp 0x4091ad
call ebp
mov ebx, eax
test ebx, ebx
je 0x4092bf
mov eax, 2
mov dword [0x412ed0], eax
cmp eax, 1
jne 0x409252
test esi, esi
jne 0x4091cb
call edi
mov esi, eax
test esi, esi
je 0x4092bf
cmp word [esi], 0
mov eax, esi
je 0x4091e5
add eax, 2
cmp word [eax], 0
jne 0x4091d3
add eax, 2
cmp word [eax], 0
jne 0x4091d3
sub eax, esi
push 0
sar eax, 1
inc eax
push 0
mov ebp, eax
push 0
push 0
push ebp
push esi
push 0
push 0
call dword [sym.imp.KERNEL32.dll_WideCharToMultiByte]
mov edi, eax
test edi, edi
je 0x409244
push edi
call fcn.00409db0
mov ebx, eax
add esp, 4
test ebx, ebx
je 0x409244
push 0
push 0
push edi
push ebx
push ebp
push esi
push 0
push 0
call dword [sym.imp.KERNEL32.dll_WideCharToMultiByte]
test eax, eax
jne 0x409236
push ebx
call fcn.0040a430
add esp, 4
xor ebx, ebx
push esi
call dword [sym.imp.KERNEL32.dll_FreeEnvironmentStringsW]
mov eax, ebx
pop edi
pop esi
pop ebp
pop ebx
ret
push esi
call dword [sym.imp.KERNEL32.dll_FreeEnvironmentStringsW]
xor eax, eax
pop edi
pop esi
pop ebp
pop ebx
ret
cmp eax, 2
jne 0x4092bf
test ebx, ebx
jne 0x409263
call ebp
mov ebx, eax
test ebx, ebx
je 0x4092bf
mov cl, byte [ebx]
mov eax, ebx
test cl, cl
je 0x40927b
mov cl, byte [eax + 1]
inc eax
test cl, cl
jne 0x40926b
mov cl, byte [eax + 1]
inc eax
test cl, cl
jne 0x40926b
sub eax, ebx
inc eax
mov esi, eax
push esi
call fcn.00409db0
mov ebp, eax
add esp, 4
test ebp, ebp
jne 0x40929d
push ebx
call dword [sym.imp.KERNEL32.dll_FreeEnvironmentStringsA]
xor eax, eax
pop edi
pop esi
pop ebp
pop ebx
ret
mov ecx, esi
mov esi, ebx
mov eax, ecx
mov edi, ebp
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
push ebx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
call dword [sym.imp.KERNEL32.dll_FreeEnvironmentStringsA]
mov eax, ebp
pop edi
pop esi
pop ebp
pop ebx
ret
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
ret
Function at 0x4099f0
Capabilities:
Write file on windows

Disassembly:
mov ecx, dword [esp + 4]
sub esp, 0x1a8
mov eax, 0x40e180
push ebx
push ebp
push esi
push edi
xor ebp, ebp
cmp ecx, dword [eax]
je 0x409a14
add eax, 8
inc ebp
cmp eax, 0x40e210
jb 0x409a05
cmp ecx, dword [ebp*8 + 0x40e180]
jne 0x409bbb
mov eax, dword [0x412d6c]
cmp eax, 1
je 0x409b7d
test eax, eax
jne 0x409a40
cmp dword [0x40dfb4], 1
je 0x409b7d
cmp ecx, 0xfc
je 0x409bbb
lea eax, [esp + 0xb4]
push 0x104
push eax
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
test eax, eax
jne 0x409a7b
mov ecx, 5
mov esi, str._program_name_unknown_
lea edi, [esp + 0xb4]
rep movsd dword es:[edi], dword [esi]
movsw word es:[edi], word [esi]
movsb byte es:[edi], byte [esi]
lea edi, [esp + 0xb4]
or ecx, 0xffffffff
xor eax, eax
lea ebx, [esp + 0xb4]
repne scasb al, byte es:[edi]
not ecx
cmp ecx, 0x3c
jbe 0x409ac4
lea edi, [esp + 0xb4]
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
dec ecx
push 3
mov ebx, ecx
lea ecx, [esp + 0xb8]
sub ecx, 0x3b
push 0x40ce28
add ebx, ecx
push ebx
call fcn.0040b2c0
add esp, 0xc
mov ecx, 6
mov esi, str.Runtime_Error__n_nProgram:
lea edi, [esp + 0x14]
xor eax, eax
rep movsd dword es:[edi], dword [esi]
movsw word es:[edi], word [esi]
or ecx, 0xffffffff
mov edi, ebx
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
lea edx, [esp + 0x14]
mov ebx, ecx
mov esi, edi
or ecx, 0xffffffff
mov edi, edx
repne scasb al, byte es:[edi]
mov ecx, ebx
dec edi
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, ebx
lea edx, [esp + 0x14]
and ecx, 3
push 0x12010
rep movsb byte es:[edi], byte [esi]
mov edi, 0x40ce08
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
push str.Microsoft_Visual_C_Runtime_Library
mov esi, edi
mov ebx, ecx
mov edi, edx
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
mov ecx, ebx
dec edi
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, ebx
lea edx, [esp + 0x1c]
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov edi, dword [ebp*8 + 0x40e184]
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov esi, edi
mov ebx, ecx
mov edi, edx
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
mov ecx, ebx
dec edi
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, ebx
lea eax, [esp + 0x1c]
and ecx, 3
push eax
rep movsb byte es:[edi], byte [esi]
call fcn.0040b230
add esp, 0xc
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x1a8
ret
mov eax, dword [0x413160]
test eax, eax
je 0x409b8e
mov esi, dword [eax + 0x10]
cmp esi, 0xffffffff
jne 0x409b98
push 0xfffffffffffffff4
call dword [sym.imp.KERNEL32.dll_GetStdHandle]
mov esi, eax
mov edx, dword [ebp*8 + 0x40e184]
lea ecx, [esp + 0x10]
push 0
push ecx
mov edi, edx
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
dec ecx
push ecx
push edx
push esi
call dword [sym.imp.KERNEL32.dll_WriteFile]
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x1a8
ret
Function at 0x40a250
Capabilities:
Get common file path

Disassembly:
sub esp, 0x10c
push ebx
mov ebx, dword [esp + 0x114]
push esi
push edi
test ebx, ebx
je 0x40a2c1
push ebx
call fcn.0040a380
add esp, 4
test eax, eax
jne 0x40a28f
mov dword [0x412d7c], 0xf
mov dword [0x412d78], 0xd
pop edi
pop esi
pop ebx
add esp, 0x10c
ret
lea eax, [esp + 0x10]
lea ecx, [esp + 0x14]
push eax
push ecx
lea edx, [esp + 0x14]
add bl, 0x40
push 0x104
push edx
mov byte [esp + 0x1c], bl
mov byte [esp + 0x1d], 0x3a
mov byte [esp + 0x1e], 0x2e
mov byte [esp + 0x1f], 0
call dword [sym.imp.KERNEL32.dll_GetFullPathNameA]
jmp 0x40a2d1
lea eax, [esp + 0x14]
push eax
push 0x104
call dword [sym.imp.KERNEL32.dll_GetCurrentDirectoryA]
test eax, eax
je 0x40a367
inc eax
cmp eax, 0x104
ja 0x40a367
mov edx, dword [esp + 0x120]
mov ecx, dword [esp + 0x124]
test edx, edx
jne 0x40a320
cmp eax, ecx
jg 0x40a2fd
mov eax, ecx
push eax
call fcn.00409db0
mov edx, eax
add esp, 4
test edx, edx
jne 0x40a33a
mov dword [0x412d78], 0xc
pop edi
pop esi
pop ebx
add esp, 0x10c
ret
cmp eax, ecx
jle 0x40a33a
mov dword [0x412d78], 0x22
xor eax, eax
pop edi
pop esi
pop ebx
add esp, 0x10c
ret
lea edi, [esp + 0x14]
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov esi, edi
mov ebx, ecx
mov edi, edx
mov eax, edi
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, ebx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
pop edi
pop esi
pop ebx
add esp, 0x10c
ret
pop edi
pop esi
xor eax, eax
pop ebx
add esp, 0x10c
ret

Function at 0x40a380
Capabilities:
Get disk information

Disassembly:
mov eax, dword [esp + 4]
test eax, eax
jne 0x40a38e
mov eax, 1
ret
add al, 0x40
mov byte [esp + 5], 0x3a
mov byte [esp + 4], al
lea eax, [esp + 4]
push eax
mov byte [esp + 0xa], 0x5c
mov byte [esp + 0xb], 0
call dword [sym.imp.KERNEL32.dll_GetDriveTypeA]
test eax, eax
je 0x40a3bd
cmp eax, 1
je 0x40a3bd
mov eax, 1
ret
xor eax, eax
ret
Function at 0x40a5e0
Capabilities:
Write file on windows

Disassembly:
mov eax, dword [esp + 4]
mov ecx, dword [0x413260]
sub esp, 0x41c
cmp eax, ecx
push ebx
push ebp
push esi
push edi
jae 0x40a78d
mov ecx, eax
mov esi, eax
sar ecx, 5
and esi, 0x1f
mov edx, dword [ecx*4 + 0x413160]
lea edi, [ecx*4 + 0x413160]
shl esi, 3
mov dword [esp + 0x24], edi
mov dword [esp + 0x14], esi
mov cl, byte [esi + edx + 4]
test cl, 1
je 0x40a78d
mov ebx, dword [esp + 0x438]
xor ebp, ebp
cmp ebx, ebp
mov dword [esp + 0x10], ebp
mov dword [esp + 0x20], ebp
jne 0x40a64e
xor eax, eax
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x41c
ret
test cl, 0x20
je 0x40a65f
push 2
push ebp
push eax
call fcn.0040b3c0
add esp, 0xc
mov eax, dword [edi]
add eax, esi
test byte [eax + 4], 0x80
je 0x40a7be
mov ebp, dword [esp + 0x434]
mov dword [esp + 0x18], 0
test ebx, ebx
mov edi, ebp
jbe 0x40a709
lea eax, [esp + 0x28]
mov ecx, edi
sub ecx, ebp
cmp ecx, ebx
jae 0x40a6ba
mov cl, byte [edi]
inc edi
cmp cl, 0xa
jne 0x40a6a7
mov esi, dword [esp + 0x20]
mov byte [eax], 0xd
inc esi
inc eax
mov dword [esp + 0x20], esi
mov byte [eax], cl
inc eax
mov edx, eax
lea ecx, [esp + 0x28]
sub edx, ecx
cmp edx, 0x400
jl 0x40a68a
mov esi, eax
lea edx, [esp + 0x28]
lea eax, [esp + 0x1c]
sub esi, edx
mov edx, dword [esp + 0x24]
push 0
push eax
lea ecx, [esp + 0x30]
mov eax, dword [edx]
push esi
push ecx
mov ecx, dword [esp + 0x24]
mov edx, dword [ecx + eax]
push edx
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x40a7af
mov eax, dword [esp + 0x1c]
mov edx, dword [esp + 0x10]
add edx, eax
cmp eax, esi
mov dword [esp + 0x10], edx
jl 0x40a705
mov eax, edi
sub eax, ebp
cmp eax, ebx
jb 0x40a686
mov esi, dword [esp + 0x14]
mov eax, dword [esp + 0x10]
test eax, eax
jne 0x40a77e
mov eax, dword [esp + 0x18]
test eax, eax
je 0x40a752
cmp eax, 5
jne 0x40a73b
mov dword [0x412d7c], eax
mov dword [0x412d78], 9
or eax, 0xffffffff
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x41c
ret
push eax
call fcn.0040a3c0
add esp, 4
or eax, 0xffffffff
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x41c
ret
mov ecx, dword [esp + 0x24]
mov edx, dword [ecx]
test byte [esi + edx + 4], 0x40
je 0x40a772
cmp byte [ebp], 0x1a
jne 0x40a772
xor eax, eax
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x41c
ret
mov dword [0x412d78], 0x1c
jmp 0x40a797
sub eax, dword [esp + 0x20]
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x41c
ret
mov dword [0x412d78], 9
pop edi
pop esi
pop ebp
mov dword [0x412d7c], 0
or eax, 0xffffffff
pop ebx
add esp, 0x41c
ret
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [esp + 0x18], eax
jmp 0x40a705
mov edx, dword [eax]
lea ecx, [esp + 0x1c]
push ebp
mov ebp, dword [esp + 0x438]
push ecx
push ebx
push ebp
push edx
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x40a7ef
mov eax, dword [esp + 0x1c]
mov dword [esp + 0x18], 0
mov dword [esp + 0x10], eax
jmp 0x40a709
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [esp + 0x18], eax
jmp 0x40a709