joyce8/EMBER2024-capa huggingface dataset:
Function at 0x4081b0
Capabilities:
Query or enumerate registry value

Disassembly:
mov eax, dword [esp + 0x10]
push ebx
push ebp
mov ebp, dword [esp + 0x14]
push esi
inc eax
push edi
push eax
mov byte [ebp], 0
mov dword [esp + 0x20], 0
call fcn.0041988e
mov edx, dword [esp + 0x1c]
add esp, 4
lea ecx, [esp + 0x1c]
mov ebx, eax
mov eax, dword [esp + 0x14]
push ecx
push edx
push eax
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyA]
mov esi, eax
test esi, esi
jne 0x40825e
mov esi, dword [esp + 0x20]
lea ecx, [esp + 0x20]
push ecx
mov ecx, dword [esp + 0x20]
lea edx, [esp + 0x1c]
push ebx
push edx
push eax
mov eax, dword [esp + 0x34]
inc esi
push eax
push ecx
mov dword [esp + 0x30], 1
mov dword [esp + 0x38], esi
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
mov edx, dword [esp + 0x1c]
mov esi, eax
push edx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
test esi, esi
jne 0x40825e
cmp byte [ebx], 0
je 0x40825e
mov eax, dword [esp + 0x20]
mov edi, ebx
dec eax
or ecx, 0xffffffff
mov dword [esp + 0x20], eax
mov byte [ebx + eax], 0
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov eax, ecx
mov esi, edi
mov edi, ebp
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
push ebx
call fcn.004198ca
add esp, 4
mov eax, 1
pop edi
pop esi
pop ebp
pop ebx
ret 0x14

Function at 0x408280
Capabilities:
Set registry value

Disassembly:
push ecx
push esi
mov esi, dword [esp + 0x10]
lea eax, [esp + 4]
push edi
mov edi, dword [esp + 0x10]
push eax
push esi
push edi
mov dword [esp + 0x14], 0
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyA]
test eax, eax
je 0x4082d2
lea ecx, [esp + 0x14]
lea edx, [esp + 8]
push ecx
push edx
push 0
push 0xf003f
push 0
push 0x439344
push 0
push esi
push edi
mov dword [esp + 0x38], 2
call dword [sym.imp.ADVAPI32.dll_RegCreateKeyExA]
test eax, eax
jne 0x408302
mov edx, dword [esp + 0x18]
or ecx, 0xffffffff
mov edi, edx
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
dec ecx
push ecx
mov ecx, dword [esp + 0xc]
push edx
push 1
push eax
mov eax, dword [esp + 0x2c]
push eax
push ecx
call dword [sym.imp.ADVAPI32.dll_RegSetValueExA]
mov edx, dword [esp + 8]
push edx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
pop edi
mov eax, 1
pop esi
pop ecx
ret 0x10

Function at 0x408310
Capabilities:
Set registry value

Disassembly:
push ecx
push esi
mov esi, dword [esp + 0x10]
lea eax, [esp + 4]
push edi
mov edi, dword [esp + 0x10]
push eax
push esi
push edi
mov dword [esp + 0x14], 0
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyA]
test eax, eax
je 0x408362
lea ecx, [esp + 0x14]
lea edx, [esp + 8]
push ecx
push edx
push 0
push 0xf003f
push 0
push 0x439344
push 0
push esi
push edi
mov dword [esp + 0x38], 2
call dword [sym.imp.ADVAPI32.dll_RegCreateKeyExA]
test eax, eax
jne 0x40838b
mov eax, dword [esp + 0x20]
mov ecx, dword [esp + 0x18]
mov edx, dword [esp + 0x1c]
push eax
mov eax, dword [esp + 0xc]
push ecx
push 3
push 0
push edx
push eax
call dword [sym.imp.ADVAPI32.dll_RegSetValueExA]
mov ecx, dword [esp + 8]
push ecx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
pop edi
mov eax, 1
pop esi
pop ecx
ret 0x14
Function at 0x4083a0
Capabilities:
Set registry value

Disassembly:
push ecx
push esi
mov esi, dword [esp + 0x10]
lea eax, [esp + 4]
push edi
mov edi, dword [esp + 0x10]
push eax
push esi
push edi
mov dword [esp + 0x14], 0
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyA]
test eax, eax
je 0x4083f2
lea ecx, [esp + 0x14]
lea edx, [esp + 8]
push ecx
push edx
push 0
push 0xf003f
push 0
push 0x439344
push 0
push esi
push edi
mov dword [esp + 0x38], 2
call dword [sym.imp.ADVAPI32.dll_RegCreateKeyExA]
test eax, eax
jne 0x40841b
mov eax, dword [esp + 0x20]
mov edx, dword [esp + 0x1c]
lea ecx, [esp + 0x18]
push eax
mov eax, dword [esp + 0xc]
push ecx
push 4
push 0
push edx
push eax
call dword [sym.imp.ADVAPI32.dll_RegSetValueExA]
mov ecx, dword [esp + 8]
push ecx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
pop edi
mov eax, 1
pop esi
pop ecx
ret 0x14

Function at 0x408500
Capabilities:
Create tcp socket
Create udp socket
Get hostname
Initialize winsock library
Resolve dns

Disassembly:
sub esp, 0x2a0
lea eax, [esp + 0x110]
push esi
push edi
push eax
push 0x202
mov edi, 1
call sub.WSOCK32.dll_WSAStartup
cmp eax, 0xffffffff
jne 0x408534
mov eax, 2
pop edi
pop esi
add esp, 0x2a0
ret 4
push 0
push 1
push 2
call sub.WSOCK32.dll_socket
mov esi, eax
cmp esi, 0xffffffff
jne 0x40855b
call sub.WSOCK32.dll_WSACleanup
mov eax, 3
pop edi
pop esi
add esp, 0x2a0
ret 4
lea ecx, [esp + 8]
push 0x10
push ecx
push esi
mov word [esp + 0x14], 2
mov dword [esp + 0x18], 0
mov word [esp + 0x16], 0
call sub.WSOCK32.dll_bind
cmp eax, 0xffffffff
jne 0x40859e
push esi
call sub.WSOCK32.dll_closesocket
call sub.WSOCK32.dll_WSACleanup
mov eax, 4
pop edi
pop esi
add esp, 0x2a0
ret 4
push 1
push esi
call sub.WSOCK32.dll_listen
cmp eax, 0xffffffff
jne 0x4085c6
push esi
call sub.WSOCK32.dll_closesocket
call sub.WSOCK32.dll_WSACleanup
mov eax, 5
pop edi
pop esi
add esp, 0x2a0
ret 4
lea edx, [esp + 0x18]
push pe_nt_image_headers32
push edx
call sub.WSOCK32.dll_gethostname
cmp eax, 0xffffffff
jne 0x4085e1
mov edi, 6
jmp 0x40861f
lea eax, [esp + 0x18]
push eax
call sub.WSOCK32.dll_gethostbyname
test eax, eax
jne 0x4085f6
mov edi, 7
jmp 0x40861f
mov edx, dword [eax + 0xc]
movsx ecx, word [eax + 0xa]
mov edx, dword [edx]
mov byte [ecx + edx], 0
mov eax, dword [eax + 0xc]
mov ecx, dword [eax]
mov eax, dword [ecx]
push eax
call sub.WSOCK32.dll_inet_ntoa
mov edx, dword [esp + 0x2ac]
push eax
push edx
call dword [sym.imp.KERNEL32.dll_lstrcpyA]
push 2
push esi
call sub.WSOCK32.dll_shutdown
push esi
call sub.WSOCK32.dll_closesocket
call sub.WSOCK32.dll_WSACleanup
mov eax, edi
pop edi
pop esi
add esp, 0x2a0
ret 4
Function at 0x408640
Capabilities:
Check os version

Disassembly:
push 0xffffffffffffffff
push 0x42a156
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x19c
push ebp
push esi
lea eax, [esp + 0x10]
push edi
mov esi, ecx
push eax
mov ebp, 1
mov dword [esp + 0x18], 0x94
call dword [sym.imp.KERNEL32.dll_GetVersionExA]
test eax, eax
jne 0x408681
mov ebp, 2
cmp dword [esp + 0x18], 4
jae 0x40868d
mov ebp, 3
cmp dword [esp + 0x24], 1
je 0x408699
mov ebp, 4
push str.CLSIDbdc67890_4fc0_11d0_a805_00aa006d2ea4InstalledVersion
lea ecx, [esp + 0x14]
call fcn.0041d976
mov edx, dword [esp + 0x10]
push 0
lea ecx, [esp + 0xac]
push 0x40
push ecx
push edx
push closesocket
mov ecx, esi
mov dword [esp + 0x1c4], 0
call fcn.004081b0
mov al, byte [esp + 0xa8]
test al, al
jne 0x4086e1
mov ebp, 5
jmp 0x408736
mov edi, dword [esp + 0x1b8]
lea eax, [esp + 0xa8]
push eax
push edi
call dword [sym.imp.KERNEL32.dll_lstrcpyA]
push str.4_71_0_2512
push edi
mov ecx, esi
call fcn.00408bb0
test eax, eax
jge 0x40870f
mov ebp, 6
jmp 0x408736
cmp dword [esp + 0x1c], 0xa
jl 0x408736
cmp dword [esp + 0x20], 0x40a08ae
jl 0x408736
push str.4_71_0_3328
push edi
mov ecx, esi
call fcn.00408bb0
test eax, eax
jge 0x408736
mov ebp, 7
lea ecx, [esp + 0xc]
call fcn.0041d7bd
lea edi, [esi + 0xb14]
lea ecx, [esp + 0xc]
push edi
mov byte [esp + 0x1b4], 1
call fcn.0041da50
push str.rpcss.exe
lea ecx, [esp + 0x10]
call fcn.0041dbf1
mov edx, dword [esp + 0xc]
lea ecx, [esp + 0xa8]
push ecx
push edx
mov ecx, esi
call fcn.00407f40
mov al, byte [esp + 0xa8]
test al, al
jne 0x40878b
mov ebp, 8
jmp 0x4087d8
lea eax, [esp + 0xa8]
push str.4.71.2512
push eax
mov ecx, esi
call fcn.00408bb0
test eax, eax
jge 0x4087aa
mov ebp, 8
jmp 0x4087d8
cmp dword [esp + 0x1c], 0xa
jl 0x4087d8
cmp dword [esp + 0x20], 0x40a08ae
jl 0x4087d8
lea ecx, [esp + 0xa8]
push str.4.71.3328
push ecx
mov ecx, esi
call fcn.00408bb0
test eax, eax
jge 0x4087d8
mov ebp, 9
push edi
lea ecx, [esp + 0x10]
call fcn.0041da50
push str.rpcrt4.dll
lea ecx, [esp + 0x10]
call fcn.0041dbf1
mov eax, dword [esp + 0xc]
lea edx, [esp + 0xa8]
push edx
push eax
mov ecx, esi
call fcn.00407f40
mov al, byte [esp + 0xa8]
test al, al
jne 0x408816
mov ebp, 8
jmp 0x408863
lea ecx, [esp + 0xa8]
push str.4.71.2512
push ecx
mov ecx, esi
call fcn.00408bb0
test eax, eax
jge 0x408835
mov ebp, 0xa
jmp 0x408863
cmp dword [esp + 0x1c], 0xa
jl 0x408863
cmp dword [esp + 0x20], 0x40a08ae
jl 0x408863
lea edx, [esp + 0xa8]
push str.4.71.3328
push edx
mov ecx, esi
call fcn.00408bb0
test eax, eax
jge 0x408863
mov ebp, 0xb
lea ecx, [esp + 0xc]
mov byte [esp + 0x1b0], 0
call fcn.0041d908
lea ecx, [esp + 0x10]
mov dword [esp + 0x1b0], 0xffffffff
call fcn.0041d908
mov ecx, dword [esp + 0x1a8]
pop edi
mov eax, ebp
pop esi
mov dword fs:[0], ecx
pop ebp
add esp, 0x1a8
ret 4
Function at 0x4088b0
Capabilities:
Create process on windows

Disassembly:
sub esp, 0x54
push edi
mov ecx, 0x11
xor eax, eax
lea edi, [esp + 0x14]
rep stosd dword es:[edi], eax
mov eax, dword [esp + 0x60]
mov dword [esp + 0x14], 0x44
test eax, eax
jne 0x4088e0
mov dword [esp + 0x40], 1
mov word [esp + 0x44], 0
lea eax, [esp + 4]
mov edx, dword [esp + 0x5c]
lea ecx, [esp + 0x14]
push eax
push ecx
push 0
push 0
push 0
push 0
push 0
push 0
push edx
push 0
call dword [sym.imp.KERNEL32.dll_CreateProcessA]
mov eax, dword [esp + 4]
test eax, eax
je 0x408914
push 0xffffffffffffffff
push eax
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
pop edi
add esp, 0x54
ret 8

Function at 0x408950
Capabilities:
Query or enumerate registry value
Set registry value

Disassembly:
sub esp, 8
push esi
mov esi, dword [esp + 0x14]
lea eax, [esp + 4]
push edi
mov edi, dword [esp + 0x14]
push eax
push esi
push edi
mov dword [esp + 0x14], 0
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyA]
test eax, eax
je 0x4089a8
lea ecx, [esp + 0x18]
lea edx, [esp + 8]
push ecx
push edx
push 0
push 0xf003f
push 0
push 0x439344
push 0
push esi
push edi
mov dword [esp + 0x3c], 2
call dword [sym.imp.ADVAPI32.dll_RegCreateKeyExA]
test eax, eax
jne 0x408aa5
mov esi, dword [esp + 0x1c]
lea eax, [esp + 0xc]
lea ecx, [esp + 0x18]
push eax
mov eax, dword [esp + 0xc]
lea edx, [esp + 0x18]
push ecx
push edx
push 0
mov edi, 4
push esi
push eax
mov dword [esp + 0x2c], edi
mov dword [esp + 0x24], edi
mov dword [esp + 0x30], 0
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
test eax, eax
jne 0x4089e8
inc dword [esp + 0x18]
jmp 0x4089f0
mov dword [esp + 0x18], 1
cmp dword [esp + 0x18], 1
ja 0x408a7d
push str.StdOle2
push esi
call fcn.0040a650
add esp, 8
test eax, eax
jne 0x408a79
push str.MSVBVM50
push esi
call fcn.0040a650
add esp, 8
test eax, eax
jne 0x408a79
push str.OleAut32
push esi
call fcn.0040a650
add esp, 8
test eax, eax
jne 0x408a79
push str.OlePro32
push esi
call fcn.0040a650
add esp, 8
test eax, eax
jne 0x408a79
push str.Atl.DLL
push esi
call fcn.0040a650
add esp, 8
test eax, eax
jne 0x408a79
push str.MSVCRT
push esi
call fcn.0040a650
add esp, 8
test eax, eax
jne 0x408a79
push str.MFC42
push esi
call fcn.0040a650
add esp, 8
test eax, eax
je 0x408a7d
inc dword [esp + 0x18]
mov edx, dword [esp + 8]
lea ecx, [esp + 0x18]
push edi
push ecx
push edi
push 0
push esi
push edx
mov dword [esp + 0x2c], edi
mov dword [esp + 0x24], edi
call dword [sym.imp.ADVAPI32.dll_RegSetValueExA]
mov eax, dword [esp + 8]
push eax
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
pop edi
mov eax, 1
pop esi
add esp, 8
ret 0xc

Function at 0x40a3d0
Capabilities:
Delete file

Disassembly:
mov eax, dword [esp + 4]
push eax
call dword [sym.imp.KERNEL32.dll_DeleteFileA]
test eax, eax
jne 0x40a3e7
call dword [sym.imp.KERNEL32.dll_GetLastError]
jmp 0x40a3e9
xor eax, eax
test eax, eax
je 0x40a3fa
push eax
call fcn.0040cc00
add esp, 4
or eax, 0xffffffff
ret
xor eax, eax
ret
Function at 0x40a610
Capabilities:
Move file

Disassembly:
mov eax, dword [esp + 8]
mov ecx, dword [esp + 4]
push eax
push ecx
call dword [sym.imp.KERNEL32.dll_MoveFileA]
test eax, eax
jne 0x40a62c
call dword [sym.imp.KERNEL32.dll_GetLastError]
jmp 0x40a62e
xor eax, eax
test eax, eax
je 0x40a63f
push eax
call fcn.0040cc00
add esp, 4
or eax, 0xffffffff
ret
xor eax, eax
ret

Function at 0x40a910
Capabilities:
Accept command line arguments

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x42f270
push 0x40e0d8
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
add esp, 0xffffffa8
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 [0x43b1f8], edx
mov ecx, eax
and ecx, 0xff
mov dword [0x43b1f4], ecx
shl ecx, 8
add ecx, edx
mov dword [0x43b1f0], ecx
shr eax, 0x10
mov dword [0x43b1ec], eax
call fcn.0040ffa0
test eax, eax
jne 0x40a97a
push 0x1c
call fcn.0040aac0
add esp, 4
call fcn.0040d700
test eax, eax
jne 0x40a98d
push 0x10
call fcn.0040aac0
add esp, 4
mov dword [ebp - 4], 0
call fcn.0040fd90
call fcn.0040c270
call dword [sym.imp.KERNEL32.dll_GetCommandLineA]
mov dword [0x43c82c], eax
call fcn.0040fc30
mov dword [0x43b1dc], eax
test eax, eax
je 0x40a9c0
mov eax, dword [0x43c82c]
test eax, eax
jne 0x40a9ca
push 0xffffffffffffffff
call fcn.0040b740
add esp, 4
call fcn.0040f980
call fcn.0040f890
call fcn.0040b710
mov esi, dword [0x43c82c]
mov dword [ebp - 0x64], esi
cmp byte [esi], 0x22
jne 0x40aaa9
inc esi
mov dword [ebp - 0x64], esi
mov al, byte [esi]
cmp al, 0x22
je 0x40aa11
test al, al
je 0x40aa11
and eax, 0xff
push eax
call fcn.0040f830
add esp, 4
test eax, eax
je 0x40a9eb
inc esi
mov dword [ebp - 0x64], esi
jmp 0x40a9eb
cmp byte [esi], 0x22
jne 0x40aa1a
inc esi
mov dword [ebp - 0x64], esi
mov al, byte [esi]
test al, al
je 0x40aa2a
cmp al, 0x20
ja 0x40aa2a
inc esi
mov dword [ebp - 0x64], esi
jmp 0x40aa1a
mov dword [ebp - 0x30], 0
lea eax, [ebp - 0x5c]
push eax
call dword [sym.imp.KERNEL32.dll_GetStartupInfoA]
test byte [ebp - 0x30], 1
je 0x40aa4b
mov eax, dword [ebp - 0x2c]
and eax, 0xffff
jmp 0x40aa50
mov eax, 0xa
push eax
push esi
push 0
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleHandleA]
push eax
call main
mov dword [ebp - 0x60], eax
push eax
call fcn.0040b740
jmp 0x40aa8e
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
cmp byte [esi], 0x20
jbe 0x40aa1a
inc esi
mov dword [ebp - 0x64], esi
jmp 0x40aaa9
Function at 0x40b780
Capabilities:
Terminate process

Disassembly:
push ebx
push ebp
push esi
call fcn.0040b840
mov eax, dword [0x43b228]
mov ebp, dword [esp + 0x10]
cmp eax, 1
jne 0x40b7a4
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 [0x43b224], 1
mov byte [0x43b220], bl
jne 0x40b7fe
mov ecx, dword [0x43c828]
test ecx, ecx
je 0x40b7ec
mov esi, dword [0x43c824]
sub esi, 4
cmp esi, ecx
jb 0x40b7ec
mov eax, dword [esi]
test eax, eax
je 0x40b7e5
call eax
mov ecx, dword [0x43c828]
sub esi, 4
cmp esi, ecx
jae 0x40b7d7
push 0x43408c
push 0x434084
call fcn.0040b860
add esp, 8
push 0x434098
push 0x434090
call fcn.0040b860
add esp, 8
test ebx, ebx
je 0x40b81d
call fcn.0040b850
pop esi
pop ebp
pop ebx
ret
push ebp
mov dword [0x43b228], 1
call dword [sym.imp.KERNEL32.dll_ExitProcess]

Function at 0x40d700
Capabilities:
Allocate thread local storage
Set thread local storage value

Disassembly:
push esi
call fcn.0040e1b0
call dword [sym.imp.KERNEL32.dll_TlsAlloc]
cmp eax, 0xffffffff
mov dword [0x435d20], eax
je 0x40d758
push 0x74
push 1
call fcn.00410e90
mov esi, eax
add esp, 8
test esi, esi
je 0x40d758
mov eax, dword [0x435d20]
push esi
push eax
call dword [sym.imp.KERNEL32.dll_TlsSetValue]
test eax, eax
je 0x40d758
push esi
call fcn.0040d760
add esp, 4
call dword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
mov dword [esi], eax
mov dword [esi + 4], 0xffffffff
mov eax, 1
pop esi
ret
xor eax, eax
pop esi
ret

Function at 0x40d780
Capabilities:
Get thread local storage value
Set thread local storage value

Disassembly:
push esi
push edi
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov edi, eax
mov eax, dword [0x435d20]
push eax
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
mov esi, eax
test esi, esi
jne 0x40d7ee
push 0x74
push 1
call fcn.00410e90
mov esi, eax
add esp, 8
test esi, esi
je 0x40d7e4
mov ecx, dword [0x435d20]
push esi
push ecx
call dword [sym.imp.KERNEL32.dll_TlsSetValue]
test eax, eax
je 0x40d7e4
push esi
call fcn.0040d760
add esp, 4
call dword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
push edi
mov dword [esi], eax
mov dword [esi + 4], 0xffffffff
call dword [sym.imp.KERNEL32.dll_SetLastError]
mov eax, esi
pop edi
pop esi
ret
push 0x10
call fcn.0040aac0
add esp, 4
push edi
call dword [sym.imp.KERNEL32.dll_SetLastError]
mov eax, esi
pop edi
pop esi
ret
Function at 0x40fc30
Capabilities:
Query environment variable

Disassembly:
mov eax, dword [0x43b500]
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 0x40fc72
call edi
mov esi, eax
test esi, esi
je 0x40fc5c
mov eax, 1
jmp 0x40fc6d
call ebp
mov ebx, eax
test ebx, ebx
je 0x40fd7f
mov eax, 2
mov dword [0x43b500], eax
cmp eax, 1
jne 0x40fd12
test esi, esi
jne 0x40fc8b
call edi
mov esi, eax
test esi, esi
je 0x40fd7f
cmp word [esi], 0
mov eax, esi
je 0x40fca5
add eax, 2
cmp word [eax], 0
jne 0x40fc93
add eax, 2
cmp word [eax], 0
jne 0x40fc93
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 0x40fd04
push edi
call fcn.0040ac40
mov ebx, eax
add esp, 4
test ebx, ebx
je 0x40fd04
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 0x40fcf6
push ebx
call fcn.0040ad10
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 0x40fd7f
test ebx, ebx
jne 0x40fd23
call ebp
mov ebx, eax
test ebx, ebx
je 0x40fd7f
mov cl, byte [ebx]
mov eax, ebx
test cl, cl
je 0x40fd3b
mov cl, byte [eax + 1]
inc eax
test cl, cl
jne 0x40fd2b
mov cl, byte [eax + 1]
inc eax
test cl, cl
jne 0x40fd2b
sub eax, ebx
inc eax
mov esi, eax
push esi
call fcn.0040ac40
mov ebp, eax
add esp, 4
test ebp, ebp
jne 0x40fd5d
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 0x410020
Capabilities:
Write file on windows

Disassembly:
mov ecx, dword [esp + 4]
sub esp, 0x1a8
mov eax, 0x4360d8
push ebx
push ebp
push esi
push edi
xor ebp, ebp
cmp ecx, dword [eax]
je 0x410044
add eax, 8
inc ebp
cmp eax, 0x436168
jb 0x410035
cmp ecx, dword [ebp*8 + 0x4360d8]
jne 0x4101eb
mov eax, dword [0x43b1e4]
cmp eax, 1
je 0x4101ad
test eax, eax
jne 0x410070
cmp dword [0x4359e4], 1
je 0x4101ad
cmp ecx, 0xfc
je 0x4101eb
lea eax, [esp + 0xb4]
push 0x104
push eax
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
test eax, eax
jne 0x4100ab
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 0x4100f4
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 0x42f7c8
add ebx, ecx
push ebx
call fcn.00413820
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, 0x42f7a8
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 + 0x4360dc]
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.00413790
add esp, 0xc
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x1a8
ret
mov eax, dword [0x43c720]
test eax, eax
je 0x4101be
mov esi, dword [eax + 0x48]
cmp esi, 0xffffffff
jne 0x4101c8
push 0xfffffffffffffff4
call dword [sym.imp.KERNEL32.dll_GetStdHandle]
mov esi, eax
mov edx, dword [ebp*8 + 0x4360dc]
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 0x4118a0
Capabilities:
Get common file path

Disassembly:
sub esp, 0x10c
push ebx
mov ebx, dword [esp + 0x114]
push esi
push edi
test ebx, ebx
je 0x411915
push ebx
call fcn.004119d0
add esp, 4
test eax, eax
jne 0x4118e3
call fcn.0040cc90
mov dword [eax], 0xf
call fcn.0040cc80
mov dword [eax], 0xd
xor eax, eax
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 0x411925
lea eax, [esp + 0x14]
push eax
push 0x104
call dword [sym.imp.KERNEL32.dll_GetCurrentDirectoryA]
test eax, eax
je 0x4119bf
inc eax
cmp eax, 0x104
ja 0x4119bf
mov edx, dword [esp + 0x120]
mov ecx, dword [esp + 0x124]
test edx, edx
jne 0x411977
cmp eax, ecx
jg 0x411951
mov eax, ecx
push eax
call fcn.0040ac40
mov edx, eax
add esp, 4
test edx, edx
jne 0x411992
call fcn.0040cc80
mov dword [eax], 0xc
xor eax, eax
pop edi
pop esi
pop ebx
add esp, 0x10c
ret
cmp eax, ecx
jle 0x411992
call fcn.0040cc80
mov dword [eax], 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 0x4119d0
Capabilities:
Get disk information

Disassembly:
mov eax, dword [esp + 4]
test eax, eax
jne 0x4119de
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 0x411a0d
cmp eax, 1
je 0x411a0d
mov eax, 1
ret
xor eax, eax
ret