joyce8/EMBER2024-capa huggingface dataset:
Function at 0x40d521
Capabilities:
Hash data using sha1

Disassembly:
mov eax, dword [esp + 4]
and dword [eax + 0x18], 0
and dword [eax + 0x14], 0
mov dword [eax], 0x67452301
mov dword [eax + 4], 0xefcdab89
mov dword [eax + 8], 0x98badcfe
mov dword [eax + 0xc], 0x10325476
mov dword [eax + 0x10], 0xc3d2e1f0
ret 4

Function at 0x40100b
Capabilities:
Query or enumerate registry value

Disassembly:
call 0x40100b
push eax
call sub.KERNEL32.dll_ExitProcess
push ebp
mov ebp, esp
add esp, 0xfffffef0
jmp 0x40109c
lea eax, [ebp - 0x104]
push eax
call fcn.004011ec
push 0x401019
lea eax, [ebp - 0x104]
push eax
call sub.KERNEL32.dll_lstrcatA
push eax
call sub.KERNEL32.dll_LoadLibraryA
test eax, eax
jne 0x401165
lea eax, [ebp - 0x10c]
push eax
push 0x20019
push 0
push 0x401038
push 0x80000001
call sub.ADVAPI32.dll_RegOpenKeyExA
cmp eax, 0
jne 0x4011a5
mov dword [ebp - 0x110], 0x103
lea eax, [ebp - 0x110]
push eax
lea eax, [ebp - 0x104]
push eax
push 0
push 0
push 0x401052
push dword [ebp - 0x10c]
call sub.ADVAPI32.dll_RegQueryValueExA
push eax
push dword [ebp - 0x10c]
call sub.ADVAPI32.dll_RegCloseKey
pop eax
cmp eax, 0
jne 0x4011a5
lea eax, [ebp - 0x104]
push eax
call sub.KERNEL32.dll_lstrlenA
lea ebx, [ebp - 0x104]
add ebx, eax
dec ebx
cmp byte [ebx], 0x5c
je 0x40114a
mov word [ebx], 0x5c
push 0x401023
lea eax, [ebp - 0x104]
push eax
call sub.KERNEL32.dll_lstrcatA
push eax
call sub.KERNEL32.dll_LoadLibraryA
test eax, eax
je 0x4011a5
mov dword [ebp - 0x108], eax
push 0x40102d
push eax
call sub.KERNEL32.dll_GetProcAddress
test eax, eax
je 0x40119a
push 0x3e8
call eax
test eax, eax
je 0x40119a
call 0x40118a
add dword [esp], 0x1e76
call eax
push 0
call sub.KERNEL32.dll_ExitProcess
push dword [ebp - 0x108]
call sub.KERNEL32.dll_FreeLibrary
push 0x10
push 0x401096
push 0x401057
push 0
call sub.USER32.dll_MessageBoxA
mov eax, 0xffffffff
leave
ret

Function at 0x433000
Capabilities:
Encode data using xor
Packed with generic packer

Disassembly:
pushal
nop
nop
nop
nop
nop
call 0x43300c
nop
nop
nop
nop
nop
pop eax
nop
add eax, 0x40a063
sub eax, 0x40a009
nop
nop
nop
nop
nop
mov ebx, dword [eax]
nop
mov ecx, dword [eax + 4]
nop
nop
nop
nop
mov edx, dword [eax + 8]
nop
nop
xor dword [ebx], edx
nop
nop
nop
nop
add ebx, 4
nop
nop
cmp ebx, ecx
nop
nop
nop
nop
jl 0x433030
nop
nop
nop
nop
nop
nop
nop
add eax, 0xc
nop
nop
nop
cmp dword [eax], 0
nop
jne 0x43301e
nop
nop
nop
popal
nop
nop
nop
nop
nop
jmp 0x431219
Function at 0x4020e0
Capabilities:
Inspect load icon resource

Disassembly:
sub esp, 0x30
mov eax, dword [esp + 0x3c]
push esi
mov esi, dword [sym.imp.USER32.dll_LoadIconA]
mov dword [esp + 8], eax
mov eax, dword [0x410ad8]
push 0x66
push eax
mov dword [esp + 0xc], 0x30
mov dword [esp + 0x14], 0x4021e0
mov dword [esp + 0x18], 0
mov dword [esp + 0x1c], 0x1e
mov dword [esp + 0x20], eax
call esi
mov ecx, dword [esp + 0x3c]
mov dword [esp + 0x1c], eax
push ecx
push 0
call dword [sym.imp.USER32.dll_LoadCursorA]
mov edx, dword [esp + 0x38]
mov dword [esp + 0x20], eax
mov eax, dword [0x410ad8]
push 0x66
push eax
mov dword [esp + 0x2c], 0x10
mov dword [esp + 0x30], 0
mov dword [esp + 0x34], edx
call esi
lea ecx, [esp + 4]
mov dword [esp + 0x30], eax
push ecx
call dword [sym.imp.USER32.dll_RegisterClassExA]
mov edx, dword [0x410ad8]
push 0
push 0
push 0
push 0x65
push edx
call dword [sym.imp.USER32.dll_CreateDialogParamA]
xor ecx, ecx
mov dword [0x410ae0], eax
test eax, eax
setne cl
mov eax, ecx
pop esi
add esp, 0x30
ret 0xc

Function at 0x402300
Capabilities:
Create thread

Disassembly:
sub esp, 0x34
lea eax, [esp + 8]
push ebp
push esi
mov esi, ecx
push edi
mov ecx, dword [0x410ae0]
push eax
push ecx
call dword [sym.imp.USER32.dll_GetWindowRect]
mov edi, dword [sym.imp.USER32.dll_GetSystemMetrics]
push 0x15
push 0xffffffffffffffff
push 0xffffffffffffffff
push 0x11
call edi
mov edx, dword [esp + 0x24]
mov ecx, dword [esp + 0x2c]
sub edx, ecx
add eax, edx
cdq
sub eax, edx
sar eax, 1
push eax
push 0x10
call edi
mov ecx, dword [esp + 0x24]
mov ebp, dword [esp + 0x2c]
sub ecx, ebp
add eax, ecx
cdq
sub eax, edx
mov edx, dword [0x410ae0]
sar eax, 1
push eax
push 0
push edx
call dword [sym.imp.USER32.dll_SetWindowPos]
lea eax, [esp + 0x10]
push eax
push 0
push esi
push fcn.00401400
push 0
push 0
call dword [sym.imp.KERNEL32.dll_CreateThread]
test eax, eax
mov dword [esi + 8], eax
jne 0x40239f
mov ecx, dword [0x410ae0]
push ecx
call dword [sym.imp.USER32.dll_DestroyWindow]
mov dword [0x410ae0], 0
xor al, al
pop edi
pop esi
pop ebp
add esp, 0x34
ret
mov edx, dword [0x410ae0]
push 0
push 0
lea eax, [esp + 0x2c]
push edx
push eax
call dword [sym.imp.USER32.dll_GetMessageA]
test eax, eax
je 0x40240a
mov edi, dword [sym.imp.USER32.dll_TranslateMessage]
mov ebp, dword [sym.imp.KERNEL32.dll_GetExitCodeThread]
push ebx
mov ebx, dword [sym.imp.USER32.dll_DispatchMessageA]
lea ecx, [esp + 0x28]
push ecx
call edi
lea edx, [esp + 0x28]
push edx
call ebx
mov ecx, dword [esi + 8]
lea eax, [esp + 0x10]
push eax
push ecx
call ebp
cmp dword [esp + 0x10], 0x103
jne 0x402409
mov edx, dword [0x410ae0]
push 0
push 0
lea eax, [esp + 0x30]
push edx
push eax
call dword [sym.imp.USER32.dll_GetMessageA]
test eax, eax
jne 0x4023cc
pop ebx
pop edi
pop esi
mov dword [0x410ae0], 0
mov al, 1
pop ebp
add esp, 0x34
ret
Function at 0x402e90
Capabilities:
Create process on windows

Disassembly:
mov eax, dword [esp + 0x14]
sub esp, 0x54
mov edx, dword [esp + 0x5c]
push esi
mov esi, dword [esp + 0x64]
push edi
mov edi, ecx
mov ecx, dword [esp + 0x6c]
push eax
mov eax, dword [esp + 0x64]
push ecx
push esi
push edx
push eax
mov ecx, edi
mov dword [esi], 0
call fcn.00403280
test eax, eax
jne 0x402ed6
cmp dword [esi], 0
jne 0x402ecc
mov dword [esi], 0x1388
xor eax, eax
pop edi
pop esi
add esp, 0x54
ret 0x14
mov eax, dword [edi + 8]
test eax, eax
je 0x402f38
mov ecx, 0x11
xor eax, eax
lea edi, [esp + 0x18]
rep stosd dword es:[edi], eax
lea ecx, [esp + 0x18]
mov dword [esp + 0x18], 0x44
push ecx
call dword [sym.imp.KERNEL32.dll_GetStartupInfoA]
lea edx, [esp + 8]
lea eax, [esp + 0x18]
push edx
push eax
push 0
push 0
push 8
push 0
push 0
push 0
push str.net.exe_accounts__sync
push 0
call dword [sym.imp.KERNEL32.dll_CreateProcessA]
test eax, eax
je 0x402f38
mov ecx, dword [esp + 0xc]
mov esi, dword [sym.imp.KERNEL32.dll_CloseHandle]
push ecx
call esi
mov edx, dword [esp + 8]
push edx
call esi
pop edi
mov eax, 1
pop esi
add esp, 0x54
ret 0x14
Function at 0x403010
Capabilities:
Get user security identifier

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x40b218
push 0x406cc8
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
add esp, 0xffffffe4
push ebx
push esi
push edi
xor esi, esi
mov dword [ebp - 0x28], esi
mov dword [ebp - 0x24], 0x80
mov dword [ebp - 0x2c], 0x10
mov dword [ebp - 0x20], esi
mov eax, dword [ebp + 0x14]
cmp eax, esi
jne 0x403065
xor eax, eax
mov ecx, dword [ebp - 0x10]
mov dword fs:[0], ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0x14
mov dword [eax], esi
mov dword [ebp - 4], esi
push 0x80
push 8
mov ebx, dword [sym.imp.KERNEL32.dll_GetProcessHeap]
call ebx
push eax
call dword [sym.imp.KERNEL32.dll_HeapAlloc]
mov edi, dword [ebp + 0x10]
mov dword [edi], eax
test eax, eax
je 0x40313a
mov eax, dword [ebp - 0x2c]
push eax
push 8
call ebx
push eax
call dword [sym.imp.KERNEL32.dll_HeapAlloc]
mov esi, eax
mov dword [ebp - 0x28], esi
test esi, esi
je 0x40313a
mov ecx, dword [ebp + 0x18]
push ecx
lea edx, [ebp - 0x2c]
push edx
push esi
lea eax, [ebp - 0x24]
push eax
mov ecx, dword [edi]
push ecx
mov edx, dword [ebp + 0xc]
push edx
mov eax, dword [ebp + 8]
push eax
call dword [sym.imp.ADVAPI32.dll_LookupAccountNameA]
test eax, eax
jne 0x403133
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp - 0x1c], eax
cmp eax, 0x7a
jne 0x40310c
mov ecx, dword [ebp - 0x24]
push ecx
mov edx, dword [edi]
push edx
push 8
call ebx
push eax
call dword [sym.imp.KERNEL32.dll_HeapReAlloc]
mov dword [edi], eax
test eax, eax
je 0x40313a
mov eax, dword [ebp - 0x2c]
push eax
push esi
push 8
call ebx
push eax
call dword [sym.imp.KERNEL32.dll_HeapReAlloc]
mov esi, eax
mov dword [ebp - 0x28], esi
test esi, esi
je 0x40313a
jmp 0x4030a9
mov ecx, dword [ebp + 0x14]
mov dword [ecx], eax
mov dword [ebp - 4], 0xffffffff
call fcn.00403154
mov eax, dword [ebp - 0x20]
mov ecx, dword [ebp - 0x10]
mov dword fs:[0], ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0x14
mov dword [ebp - 0x20], 1
mov dword [ebp - 4], 0xffffffff
call fcn.00403154
jmp 0x40311d
Function at 0x403830
Capabilities:
Compare security identifiers

Disassembly:
sub esp, 0x29c
push ebx
mov ebx, dword [esp + 0x2a8]
push ebp
push esi
test ebx, ebx
push edi
mov esi, ecx
mov dword [esp + 0x10], 0
jne 0x40385e
xor eax, eax
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x29c
ret 8
mov ecx, dword [esp + 0x2b0]
lea eax, [esp + 0x48]
push ebx
push eax
push ecx
mov ecx, esi
mov dword [ebx], 0
call fcn.004035b0
test eax, eax
mov dword [esp + 0x20], eax
jne 0x40388e
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x29c
ret 8
mov eax, dword [esi + 0xc]
test eax, eax
jne 0x4038a2
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x29c
ret 8
mov edi, dword [sym.imp.KERNEL32.dll_GetProcAddress]
push str.LsaClose
push eax
call edi
mov ebp, eax
test ebp, ebp
jne 0x4038c3
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x29c
ret 8
mov edx, dword [esi + 0xc]
push str.LsaFreeMemory
push edx
call edi
test eax, eax
mov dword [esp + 0x18], eax
jne 0x4038e3
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x29c
ret 8
mov ecx, 6
xor eax, eax
lea edi, [esp + 0x30]
push 0x80
rep stosd dword es:[edi], eax
lea eax, [esp + 0x28]
lea ecx, [esp + 0xb0]
mov dword [esp + 0x48], eax
mov eax, dword [esp + 0x24]
push ecx
mov edx, 1
push 0xffffffffffffffff
push eax
push edx
push 0
mov dword [esp + 0x3c], 0xc
mov dword [esp + 0x40], edx
mov byte [esp + 0x44], dl
mov byte [esp + 0x45], 0
call dword [sym.imp.KERNEL32.dll_MultiByteToWideChar]
lea ecx, [esp + 0x10]
lea edx, [esp + 0x30]
push ecx
push 0xf0fff
lea eax, [esp + 0xb4]
push edx
push eax
mov ecx, esi
call fcn.00402f50
test eax, eax
je 0x403962
mov dword [ebx], eax
xor eax, eax
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x29c
ret 8
mov edx, dword [esp + 0x10]
lea ecx, [esp + 0x14]
push ecx
push 5
push edx
mov ecx, esi
call fcn.00402fd0
mov edi, eax
test edi, edi
je 0x403993
mov eax, dword [esp + 0x10]
push eax
call ebp
mov dword [ebx], edi
xor eax, eax
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x29c
ret 8
mov edx, dword [esp + 0x10]
lea ecx, [esp + 0x1c]
push ecx
push 3
push edx
mov ecx, esi
call fcn.00402fd0
mov esi, eax
test esi, esi
je 0x4039cd
mov eax, dword [esp + 0x14]
push eax
call dword [esp + 0x1c]
mov ecx, dword [esp + 0x10]
push ecx
call ebp
mov dword [ebx], esi
xor eax, eax
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x29c
ret 8
mov edx, dword [esp + 0x14]
mov ecx, dword [esp + 0x1c]
mov eax, dword [edx + 8]
mov edx, dword [ecx + 8]
push eax
push edx
call dword [sym.imp.ADVAPI32.dll_EqualSid]
test eax, eax
jne 0x4039f6
mov eax, dword [esp + 0x10]
push eax
call ebp
mov dword [esp + 0x10], 0
mov ecx, dword [esp + 0x14]
mov esi, dword [esp + 0x18]
push ecx
call esi
mov edx, dword [esp + 0x1c]
push edx
call esi
mov eax, dword [esp + 0x10]
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x29c
ret 8
Function at 0x403a20
Capabilities:
Get hostname

Disassembly:
mov eax, dword [esp + 4]
sub esp, 0x10
push esi
mov esi, ecx
mov dword [esi + 8], eax
mov eax, dword [esp + 0x1c]
test eax, eax
mov dword [esi + 0xc], eax
mov dword [esi + 0x10], 1
mov dword [esi + 0x30], 0
mov dword [esi], 0x40b228
je 0x403a7b
lea ecx, [esp + 0x18]
lea edx, [esp + 4]
push ecx
push edx
mov dword [esp + 0x20], 0xf
call dword [sym.imp.KERNEL32.dll_GetComputerNameA]
mov eax, dword [esi + 0xc]
lea ecx, [esp + 4]
push eax
push ecx
call dword [sym.imp.KERNEL32.dll_lstrcmpiA]
neg eax
sbb eax, eax
inc eax
mov dword [esi + 0x10], eax
mov dword [esi + 4], 1
mov dword [esi + 0x34], 0xffffffff
mov eax, esi
pop esi
add esp, 0x10
ret 8

Function at 0x404e47
Capabilities:
Enumerate services

Disassembly:
push ecx
push ebx
mov ebx, dword [esp + 0x10]
push ebp
push esi
mov esi, ecx
mov ebp, dword [sym.imp.ADVAPI32.dll_EnumDependentServicesA]
lea eax, [esp + 0xc]
push edi
mov edx, dword [esi + 0x3c]
lea ecx, [esp + 0x1c]
push eax
push ecx
push 0
push 0
push ebx
push edx
mov dword [esp + 0x28], 0
call ebp
mov eax, dword [esp + 0x1c]
test eax, eax
jne 0x404e7e
pop edi
pop esi
pop ebp
pop ebx
pop ecx
ret 8
push eax
push 8
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push eax
call dword [sym.imp.KERNEL32.dll_HeapAlloc]
mov edi, dword [esp + 0x18]
test eax, eax
mov dword [edi], eax
jne 0x404ea3
or eax, 0xffffffff
pop edi
pop esi
pop ebp
pop ebx
pop ecx
ret 8
lea ecx, [esp + 0x10]
lea edx, [esp + 0x1c]
push ecx
mov ecx, dword [esp + 0x20]
push edx
mov edx, dword [esi + 0x3c]
push ecx
push eax
push ebx
push edx
call ebp
test eax, eax
jne 0x404ee1
mov eax, dword [edi]
push eax
push 0
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push eax
call dword [sym.imp.KERNEL32.dll_HeapFree]
mov dword [edi], 0
or eax, 0xffffffff
pop edi
pop esi
pop ebp
pop ebx
pop ecx
ret 8
mov eax, dword [esp + 0x10]
pop edi
pop esi
pop ebp
pop ebx
pop ecx
ret 8
Function at 0x4054d0
Capabilities:
Query service configuration

Disassembly:
sub esp, 8
lea eax, [esp]
push ebx
push ebp
mov ebx, dword [sym.imp.ADVAPI32.dll_QueryServiceConfigA]
push esi
push edi
mov edi, ecx
push eax
push 0
mov ecx, dword [edi + 0x3c]
push 0
push ecx
call ebx
push 0
call dword [sym.imp.KERNEL32.dll_SetLastError]
mov edx, dword [esp + 0x10]
mov ebp, dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push edx
push 0
call ebp
push eax
call dword [sym.imp.KERNEL32.dll_HeapAlloc]
mov esi, eax
test esi, esi
jne 0x40551c
pop edi
pop esi
pop ebp
pop ebx
add esp, 8
ret 4
mov ecx, dword [esp + 0x10]
mov edx, dword [edi + 0x3c]
lea eax, [esp + 0x10]
push eax
push ecx
push esi
push edx
call ebx
mov edi, eax
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov ebx, dword [sym.imp.KERNEL32.dll_lstrlenA]
mov dword [esp + 0x14], eax
test edi, edi
je 0x40554f
mov eax, dword [esi + 0xc]
push eax
call ebx
test eax, eax
jne 0x40554f
xor edi, edi
test edi, edi
je 0x40557f
mov ecx, dword [esi + 0xc]
push ecx
call ebx
inc eax
push eax
push 0
call ebp
push eax
call dword [sym.imp.KERNEL32.dll_HeapAlloc]
mov edx, dword [esp + 0x1c]
test eax, eax
mov dword [edx], eax
jne 0x405574
xor edi, edi
jmp 0x40557f
mov ecx, dword [esi + 0xc]
push ecx
push eax
call dword [sym.imp.KERNEL32.dll_lstrcpyA]
push esi
push 0
call ebp
push eax
call dword [sym.imp.KERNEL32.dll_HeapFree]
test edi, edi
jne 0x40559a
mov edx, dword [esp + 0x14]
push edx
call dword [sym.imp.KERNEL32.dll_SetLastError]
mov eax, edi
pop edi
pop esi
pop ebp
pop ebx
add esp, 8
ret 4

Function at 0x4057b0
Capabilities:
Generate random numbers using the delphi lcg

Disassembly:
mov eax, dword [esp + 8]
push esi
mov esi, dword [esp + 8]
push edi
mov edi, ecx
push eax
mov ecx, dword [esi]
push ecx
mov ecx, edi
call fcn.00405770
mov ecx, dword [esi + 4]
mov dword [esi], eax
and eax, 0xff
mov edx, dword [esi + 8]
add eax, ecx
mov ecx, edi
imul eax, eax, 0x8088405
inc eax
mov dword [esi + 4], eax
shr eax, 0x18
push eax
push edx
call fcn.00405770
mov dword [esi + 8], eax
pop edi
pop esi
ret 8

Function at 0x406a10
Capabilities:
Terminate process

Disassembly:
mov eax, dword [0x410b48]
push ebx
push ebp
mov ebp, dword [esp + 0xc]
cmp eax, 1
push esi
jne 0x406a2f
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 [0x410b44], 1
mov byte [0x410b40], bl
jne 0x406a89
mov ecx, dword [0x411f4c]
test ecx, ecx
je 0x406a77
mov esi, dword [0x411f48]
sub esi, 4
cmp esi, ecx
jb 0x406a77
mov eax, dword [esi]
test eax, eax
je 0x406a70
call eax
mov ecx, dword [0x411f4c]
sub esi, 4
cmp esi, ecx
jae 0x406a62
push 0x40d020
push 0x40d018
call fcn.00406ac0
add esp, 8
push 0x40d02c
push 0x40d024
call fcn.00406ac0
add esp, 8
test ebx, ebx
jne 0x406ab0
push ebp
mov dword [0x410b48], 1
call dword [sym.imp.KERNEL32.dll_ExitProcess]
pop esi
pop ebp
pop ebx
ret
Function at 0x408da0
Capabilities:
Query environment variable

Disassembly:
mov eax, dword [0x410c98]
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 0x408de2
call edi
mov esi, eax
test esi, esi
je 0x408dcc
mov eax, 1
jmp 0x408ddd
call ebp
mov ebx, eax
test ebx, ebx
je 0x408eef
mov eax, 2
mov dword [0x410c98], eax
cmp eax, 1
jne 0x408e82
test esi, esi
jne 0x408dfb
call edi
mov esi, eax
test esi, esi
je 0x408eef
cmp word [esi], 0
mov eax, esi
je 0x408e15
add eax, 2
cmp word [eax], 0
jne 0x408e03
add eax, 2
cmp word [eax], 0
jne 0x408e03
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 0x408e74
push edi
call fcn.00407570
mov ebx, eax
add esp, 4
test ebx, ebx
je 0x408e74
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 0x408e66
push ebx
call fcn.00407520
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 0x408eef
test ebx, ebx
jne 0x408e93
call ebp
mov ebx, eax
test ebx, ebx
je 0x408eef
mov cl, byte [ebx]
mov eax, ebx
test cl, cl
je 0x408eab
mov cl, byte [eax + 1]
inc eax
test cl, cl
jne 0x408e9b
mov cl, byte [eax + 1]
inc eax
test cl, cl
jne 0x408e9b
sub eax, ebx
inc eax
mov esi, eax
push esi
call fcn.00407570
mov ebp, eax
add esp, 4
test ebp, ebp
jne 0x408ecd
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 0x409460
Capabilities:
Write file on windows

Disassembly:
mov ecx, dword [esp + 4]
sub esp, 0x1a8
mov eax, 0x40e530
push ebx
push ebp
push esi
push edi
xor ebp, ebp
cmp ecx, dword [eax]
je 0x409484
add eax, 8
inc ebp
cmp eax, 0x40e5c0
jb 0x409475
cmp ecx, dword [ebp*8 + 0x40e530]
jne 0x40962b
mov eax, dword [0x410b54]
cmp eax, 1
je 0x4095ed
test eax, eax
jne 0x4094b0
cmp dword [0x40e164], 1
je 0x4095ed
cmp ecx, 0xfc
je 0x40962b
lea eax, [esp + 0xb4]
push 0x104
push eax
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
test eax, eax
jne 0x4094eb
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 0x409534
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 0x40b65c
add ebx, ecx
push ebx
call fcn.004067e0
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, 0x40b63c
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 + 0x40e534]
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.0040a480
add esp, 0xc
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x1a8
ret
mov eax, dword [0x411e40]
test eax, eax
je 0x4095fe
mov esi, dword [eax + 0x10]
cmp esi, 0xffffffff
jne 0x409608
push 0xfffffffffffffff4
call dword [sym.imp.KERNEL32.dll_GetStdHandle]
mov esi, eax
mov edx, dword [ebp*8 + 0x40e534]
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 0x40a050
Capabilities:
Write file on windows

Disassembly:
mov eax, dword [esp + 4]
mov ecx, dword [0x411f40]
sub esp, 0x41c
cmp eax, ecx
push ebx
push ebp
push esi
push edi
jae 0x40a1fd
mov ecx, eax
mov esi, eax
sar ecx, 5
and esi, 0x1f
mov edx, dword [ecx*4 + 0x411e40]
lea edi, [ecx*4 + 0x411e40]
shl esi, 3
mov dword [esp + 0x24], edi
mov dword [esp + 0x14], esi
mov cl, byte [esi + edx + 4]
test cl, 1
je 0x40a1fd
mov ebx, dword [esp + 0x438]
xor ebp, ebp
cmp ebx, ebp
mov dword [esp + 0x10], ebp
mov dword [esp + 0x20], ebp
jne 0x40a0be
xor eax, eax
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x41c
ret
test cl, 0x20
je 0x40a0cf
push 2
push ebp
push eax
call fcn.0040a6e0
add esp, 0xc
mov eax, dword [edi]
add eax, esi
test byte [eax + 4], 0x80
je 0x40a22e
mov ebp, dword [esp + 0x434]
mov dword [esp + 0x18], 0
test ebx, ebx
mov edi, ebp
jbe 0x40a179
lea eax, [esp + 0x28]
mov ecx, edi
sub ecx, ebp
cmp ecx, ebx
jae 0x40a12a
mov cl, byte [edi]
inc edi
cmp cl, 0xa
jne 0x40a117
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 0x40a0fa
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 0x40a21f
mov eax, dword [esp + 0x1c]
mov edx, dword [esp + 0x10]
add edx, eax
cmp eax, esi
mov dword [esp + 0x10], edx
jl 0x40a175
mov eax, edi
sub eax, ebp
cmp eax, ebx
jb 0x40a0f6
mov esi, dword [esp + 0x14]
mov eax, dword [esp + 0x10]
test eax, eax
jne 0x40a1ee
mov eax, dword [esp + 0x18]
test eax, eax
je 0x40a1c2
cmp eax, 5
jne 0x40a1ab
mov dword [0x410b04], eax
mov dword [0x410b00], 9
or eax, 0xffffffff
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x41c
ret
push eax
call fcn.00409e90
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 0x40a1e2
cmp byte [ebp], 0x1a
jne 0x40a1e2
xor eax, eax
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x41c
ret
mov dword [0x410b00], 0x1c
jmp 0x40a207
sub eax, dword [esp + 0x20]
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x41c
ret
mov dword [0x410b00], 9
pop edi
pop esi
pop ebp
mov dword [0x410b04], 0
or eax, 0xffffffff
pop ebx
add esp, 0x41c
ret
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [esp + 0x18], eax
jmp 0x40a175
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 0x40a25f
mov eax, dword [esp + 0x1c]
mov dword [esp + 0x18], 0
mov dword [esp + 0x10], eax
jmp 0x40a179
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [esp + 0x18], eax
jmp 0x40a179