joyce8/EMBER2024-capa huggingface dataset:
Function at 0x1000f465
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
push ebx
push edi
push esi
sub esp, 0x168
mov eax, dword [ebp + 8]
xor ecx, ecx
mov dword [0x10040a04], 0xec4
mov edx, ecx
mov dword [ebp - 0x130], eax
mov dword [ebp - 0x134], edx
mov dword [ebp - 0x138], ecx
mov eax, dword [ebp - 0x138]
mov ecx, dword [ebp - 0x134]
lea edx, section..data
imul esi, eax, 0x134
mov edi, edx
add edi, esi
add edi, 0x130
mov esi, dword [edi]
imul edi, eax, 0x134
add edx, edi
add edx, 0x12c
movzx edx, word [edx]
xor edx, esi
add edx, ecx
add eax, 1
cmp eax, 0x26c
mov ecx, edx
mov dword [ebp - 0x13c], edx
mov dword [ebp - 0x134], ecx
mov dword [ebp - 0x138], eax
jne 0x1000f494
xor eax, eax
mov dword [0x10040a08], 0x1562
mov dword [ebp - 0x140], eax
mov eax, dword [ebp - 0x140]
mov cl, byte [eax + 0x1001093c]
mov dl, byte [eax + 0x1001090d]
sub dl, cl
mov byte [ebp + eax - 0x12c], dl
add eax, 1
cmp eax, 0xe
mov dword [ebp - 0x140], eax
jne 0x1000f4ff
lea eax, [ebp - 0x12c]
mov dword [0x10040a04], 0xdb0
mov dword [0x10040a08], 0xffffeaa5
mov dword [ebp - 0x144], eax
call fcn.1000f029
mov dword [esp], eax
mov eax, dword [ebp - 0x144]
mov dword [esp + 4], eax
call fcn.1000f13f
mov ecx, eax
mov dword [0x10040a1c], eax
mov eax, esp
mov edx, dword [ebp - 0x13c]
mov dword [eax + 4], edx
mov dword [eax + 0xc], 4
mov dword [eax + 8], 0x1000
mov dword [eax], 0
call ecx
sub esp, 0x10
xor ecx, ecx
mov edx, dword [0x10040a04]
add edx, 0x1adc
mov dword [0x10040a08], edx
mov edx, ecx
mov dword [ebp - 0x148], eax
mov dword [ebp - 0x14c], edx
mov dword [ebp - 0x150], ecx
mov eax, dword [ebp - 0x150]
mov ecx, dword [ebp - 0x14c]
lea edx, section..data
imul esi, eax, 0x134
mov edi, edx
add edi, esi
add edi, 0x130
mov esi, dword [edi]
imul edi, eax, 0x134
mov ebx, edx
add ebx, edi
add ebx, 0x44
mov edi, dword [ebx]
imul ebx, eax, 0x134
add edx, ebx
add edx, 0x12c
movzx edx, word [edx]
xor edx, esi
mov esi, dword [ebp - 0x148]
add esi, ecx
mov dword [esp], esi
mov dword [esp + 4], edi
mov dword [esp + 8], edx
mov dword [ebp - 0x154], eax
mov dword [ebp - 0x158], ecx
mov dword [ebp - 0x15c], edx
call fcn.1000e6b6
mov eax, dword [ebp - 0x15c]
mov ecx, dword [ebp - 0x158]
add eax, ecx
mov edx, dword [ebp - 0x154]
add edx, 1
cmp edx, 0x26c
mov dword [ebp - 0x14c], eax
mov dword [ebp - 0x150], edx
jne 0x1000f5b8
lea eax, [0x1001091b]
mov ecx, 0x20
lea edx, [ebp - 0x10c]
mov dword [0x10040a04], 0x1f64
mov dword [esp], edx
mov dword [esp + 4], eax
mov dword [esp + 8], 0x20
mov dword [ebp - 0x160], edx
mov dword [ebp - 0x164], ecx
call fcn.1000e777
mov eax, dword [ebp - 0x160]
mov dword [esp], eax
mov ecx, dword [ebp - 0x148]
mov dword [esp + 4], ecx
mov dword [esp + 8], ecx
mov edx, dword [ebp - 0x13c]
mov dword [esp + 0xc], edx
call fcn.1000e260
xor eax, eax
mov ecx, dword [ebp - 0x148]
add ecx, 0xc7311
mov edx, dword [ebp - 0x130]
mov dword [edx], ecx
mov dword [edx + 4], 0x143600
mov ecx, dword [ebp - 0x148]
add ecx, 0x80305
mov dword [edx + 8], ecx
mov dword [edx + 0xc], 0x2000
add esp, 0x168
pop esi
pop edi
pop ebx
pop ebp
ret
Function at 0x401207
Capabilities:
Encrypt data using tea

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x834
mov eax, dword [0x4182d8]
xor edx, edx
push ebx
push esi
push edi
mov edi, ecx
mov dword [ebp - 0x2c], eax
mov eax, dword [0x4182dc]
lea ecx, [ebp - 0x10]
mov dword [ebp - 0x30], edi
mov dword [ebp - 0x10], edx
mov esi, dword [edi]
mov ebx, dword [edi + 4]
mov dword [ebp - 4], esi
mov dword [ebp - 0x28], 0x9e3779b9
mov dword [ebp - 0x34], eax
call fcn.00401200
add dword [ebp - 0x10], 0x23f
cmp dword [0xae6644], 0x14
jne 0x401263
push edx
lea eax, [ebp - 0x834]
push eax
push edx
call dword [sym.imp.KERNEL32.dll_FindNextVolumeW]
mov eax, dword [0x4182e4]
mov edi, dword [0x4182e0]
push 0x20
pop edx
mov dword [ebp - 0x24], eax
mov dword [ebp - 0x20], edx
mov dword [ebp - 0x1c], 2
add dword [ebp - 0x1c], 3
mov eax, esi
mov dword [ebp - 0xc], 0xedeb2e40
shl eax, 4
add eax, edi
cmp dword [0xae6644], 0xfa9
mov dword [ebp - 8], eax
mov eax, dword [0xae6640]
cmove eax, dword [ebp - 0xc]
and dword [ebp - 0xc], 0
cmp dword [0xae6644], 0x3eb
mov dword [0xae6640], eax
mov eax, dword [0xae6598]
cmove eax, dword [ebp - 0xc]
mov dword [0xae6598], eax
mov eax, dword [ebp - 0x10]
add eax, esi
mov dword [ebp - 0xc], eax
mov eax, dword [ebp - 4]
shr eax, 5
mov dword [ebp - 0x18], eax
mov eax, dword [ebp - 0x24]
add dword [ebp - 0x18], eax
mov eax, dword [ebp - 8]
and dword [ebp - 0x14], 0
mov dword [0xae663c], 0xf4ea3dee
mov dword [ebp - 4], eax
mov eax, dword [ebp - 0xc]
add dword [ebp - 0x14], eax
mov eax, dword [ebp - 0x14]
xor dword [ebp - 4], eax
mov eax, dword [ebp - 0x18]
xor eax, dword [ebp - 4]
sub ebx, eax
mov dword [ebp - 0x18], eax
mov eax, ebx
shl eax, 4
mov dword [ebp - 8], eax
mov eax, dword [ebp - 0x2c]
add dword [ebp - 8], eax
mov eax, dword [ebp - 0x10]
mov ecx, dword [ebp - 0x1c]
add eax, ebx
and dword [ebp - 4], 0
mov dword [ebp - 0xc], eax
mov eax, ebx
shr eax, cl
add eax, dword [ebp - 0x34]
mov dword [ebp - 0x18], eax
mov eax, dword [ebp - 8]
mov dword [ebp - 0x14], eax
mov eax, dword [ebp - 0xc]
add dword [ebp - 4], eax
mov eax, dword [ebp - 4]
xor dword [ebp - 0x14], eax
cmp dword [0xae6644], 0xb03
mov eax, dword [ebp - 0x14]
mov dword [ebp - 8], eax
jne 0x401362
push 0
call dword [sym.imp.KERNEL32.dll_GetConsoleAliasesLengthA]
mov eax, dword [ebp - 8]
mov edx, dword [ebp - 0x20]
xor eax, dword [ebp - 0x18]
sub esi, eax
mov dword [ebp - 8], eax
mov dword [ebp - 4], esi
mov eax, dword [ebp - 0x28]
sub dword [ebp - 0x10], eax
dec edx
mov dword [ebp - 0x20], edx
jne 0x401277
mov edi, dword [ebp - 0x30]
mov dword [edi], esi
mov dword [edi + 4], ebx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
Function at 0x40c062
Capabilities:
Link many functions at runtime
Print debug messages

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x24
mov eax, dword [0x417f10]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 8]
push ebx
mov ebx, dword [sym.imp.KERNEL32.dll_EncodePointer]
push esi
push edi
mov dword [ebp - 0x1c], eax
xor esi, esi
mov eax, dword [ebp + 0xc]
push esi
mov dword [ebp - 0x20], eax
call ebx
mov edi, eax
mov dword [ebp - 0x18], edi
call fcn.00407f6c
mov dword [ebp - 0x14], eax
cmp dword [0x441e34], esi
jne 0x40c155
push 0x800
push esi
push str.USER32.DLL
call dword [sym.imp.KERNEL32.dll_LoadLibraryExW]
mov edi, eax
test edi, edi
jne 0x40c0e2
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x57
jne 0x40c235
push esi
push esi
push str.USER32.DLL
call dword [sym.imp.KERNEL32.dll_LoadLibraryExW]
mov edi, eax
test edi, edi
je 0x40c235
push str.MessageBoxW
push edi
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
test eax, eax
je 0x40c235
push eax
call ebx
push str.GetActiveWindow
push edi
mov dword [0x441e34], eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
push eax
call ebx
push str.GetLastActivePopup
push edi
mov dword [0x441e38], eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
push eax
call ebx
push str.GetUserObjectInformationW
push edi
mov dword [0x441e3c], eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
push eax
call ebx
mov dword [0x441e44], eax
test eax, eax
je 0x40c152
push str.GetProcessWindowStation
push edi
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
push eax
call ebx
mov dword [0x441e40], eax
mov edi, dword [ebp - 0x18]
call dword [sym.imp.KERNEL32.dll_IsDebuggerPresent]
test eax, eax
je 0x40c17a
mov eax, dword [ebp - 0x1c]
test eax, eax
je 0x40c16d
push eax
call dword [sym.imp.KERNEL32.dll_OutputDebugStringW]
cmp dword [ebp - 0x14], esi
je 0x40c18f
push 4
pop eax
jmp 0x40c237
cmp dword [ebp - 0x14], esi
je 0x40c18f
push dword [0x441e34]
call dword [sym.imp.KERNEL32.dll_DecodePointer]
push 3
jmp 0x40c174
mov eax, dword [0x441e40]
mov ebx, dword [sym.imp.KERNEL32.dll_DecodePointer]
cmp eax, edi
je 0x40c1ed
cmp dword [0x441e44], edi
je 0x40c1ed
push eax
call ebx
push dword [0x441e44]
mov dword [ebp - 0x14], eax
call ebx
mov ecx, dword [ebp - 0x14]
mov dword [ebp - 0x18], eax
test ecx, ecx
je 0x40c1ed
test eax, eax
je 0x40c1ed
call ecx
test eax, eax
je 0x40c1e2
lea ecx, [ebp - 0x24]
push ecx
push 0xc
lea ecx, [ebp - 0x10]
push ecx
push 1
push eax
call dword [ebp - 0x18]
test eax, eax
je 0x40c1e2
test byte [ebp - 8], 1
jne 0x40c1ed
mov edi, dword [ebp + 0x10]
or edi, 0x200000
jmp 0x40c21d
mov eax, dword [0x441e38]
cmp eax, edi
je 0x40c21a
push eax
call ebx
test eax, eax
je 0x40c21a
call eax
mov esi, eax
test esi, esi
je 0x40c21a
mov eax, dword [0x441e3c]
cmp eax, edi
je 0x40c21a
push eax
call ebx
test eax, eax
je 0x40c21a
push esi
call eax
mov esi, eax
mov edi, dword [ebp + 0x10]
push dword [0x441e34]
call ebx
test eax, eax
je 0x40c235
push edi
push dword [ebp - 0x20]
push dword [ebp - 0x1c]
push esi
call eax
jmp 0x40c237
xor eax, eax
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.004040a8
mov esp, ebp
pop ebp
ret
Function at 0x401830
Capabilities:
Set console window title

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x404185
mov eax, dword fs:[0]
push eax
sub esp, 0x44
mov eax, dword [0x408040]
xor eax, ebp
mov dword [ebp - 0x10], eax
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
xorps xmm0, xmm0
push 0x30
movups xmmword [ebp - 0x44], xmm0
call fcn.0040320d
movups xmm0, xmmword [str.ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789]
mov edi, eax
mov dword [ebp - 0x34], 0x24
add esp, 4
mov dword [ebp - 0x44], edi
mov dword [ebp - 0x30], 0x2f
movups xmmword [edi], xmm0
movups xmm0, xmmword [0x40557c]
movups xmmword [edi + 0x10], xmm0
mov ecx, dword [0x40558c]
mov dword [edi + 0x20], ecx
mov byte [edi + 0x24], 0
mov dword [ebp - 4], 0
mov dword [ebp - 0x50], 1
mov dword [ebp - 0x4c], 0
nop word [eax + eax]
xorps xmm0, xmm0
mov dword [ebp - 0x18], 0
movups xmmword [ebp - 0x28], xmm0
mov dword [ebp - 0x14], 0xf
mov byte [ebp - 0x28], 0
mov byte [ebp - 4], 1
mov esi, 0x14
call dword [sym.imp.api_ms_win_crt_utility_l1_1_0.dll_rand]
xor edx, edx
mov ecx, 0x24
div ecx
mov ecx, dword [ebp - 0x18]
mov dl, byte [edi + edx]
mov edi, dword [ebp - 0x14]
mov byte [ebp - 0x2c], dl
cmp ecx, edi
jae 0x40191b
lea eax, [ecx + 1]
cmp edi, 0xf
mov dword [ebp - 0x18], eax
lea eax, [ebp - 0x28]
cmova eax, dword [ebp - 0x28]
mov byte [eax + ecx], dl
mov byte [eax + ecx + 1], 0
jmp 0x40192e
push dword [ebp - 0x2c]
mov byte [ebp - 0x48], 0
push dword [ebp - 0x48]
push ecx
lea ecx, [ebp - 0x28]
call fcn.00402890
mov edi, dword [ebp - 0x44]
sub esi, 1
jne 0x4018e2
cmp dword [ebp - 0x14], 0xf
lea eax, [ebp - 0x28]
cmova eax, dword [ebp - 0x28]
push eax
call dword [sym.imp.KERNEL32.dll_SetConsoleTitleA]
lea ecx, [ebp - 0x50]
call fcn.00402500
mov byte [ebp - 4], 0
mov ecx, dword [ebp - 0x14]
cmp ecx, 0xf
jbe 0x4018c0
mov edx, dword [ebp - 0x28]
inc ecx
mov eax, edx
cmp ecx, 0x1000
jb 0x40197e
mov edx, dword [eax - 4]
add ecx, 0x23
sub eax, edx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x401990
push ecx
push edx
call fcn.0040323d
mov edi, dword [ebp - 0x44]
add esp, 8
jmp 0x4018c0
call dword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
int3
Function at 0x403a9f
Capabilities:
Parse pe header

Disassembly:
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleHandleW]
test eax, eax
je 0x403ade
mov ecx, 0x5a4d
cmp word [eax], cx
jne 0x403ade
mov ecx, dword [eax + 0x3c]
add ecx, eax
cmp dword [ecx], 0x4550
jne 0x403ade
mov eax, 0x10b
cmp word [ecx + 0x18], ax
jne 0x403ade
cmp dword [ecx + 0x74], 0xe
jbe 0x403ade
cmp dword [ecx + 0xe8], 0
setne al
ret
xor al, al
ret
Function at 0x404634
Capabilities:
Query environment variable

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x44
push 0x40
lea eax, [ebp - 0x40]
push eax
push str.username
call dword [sym.imp.KERNEL32.dll_GetEnvironmentVariableA]
mov dword [ebp - 0x44], eax
cmp dword [ebp - 0x44], 0
jne 0x40465d
mov byte [0x41e960], 0
jmp 0x40466e
lea ecx, [ebp - 0x40]
push ecx
push 0x41e960
call fcn.00407c50
add esp, 8
mov esp, ebp
pop ebp
ret

Function at 0x404672
Capabilities:
Query environment variable

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x18
mov dword [ebp - 0x10], str.OSQLUSER
mov dword [ebp - 0xc], str.OSQLPASSWORD
mov dword [ebp - 8], str.OSQLSERVER
mov eax, dword [ebp + 8]
mov dword [ebp - 0x18], eax
cmp dword [ebp - 0x18], 0
je 0x4046a7
cmp dword [ebp - 0x18], 1
je 0x4046b7
cmp dword [ebp - 0x18], 2
je 0x4046c7
jmp 0x4046d5
mov dword [ebp - 4], 0x41f780
mov dword [ebp - 0x14], 0x80
jmp 0x4046d5
mov dword [ebp - 4], 0x41f620
mov dword [ebp - 0x14], 0x80
jmp 0x4046d5
mov dword [ebp - 4], 0x41f940
mov dword [ebp - 0x14], 0x3d
mov ecx, dword [ebp - 4]
mov byte [ecx], 0
mov edx, dword [ebp - 0x14]
push edx
mov eax, dword [ebp - 4]
push eax
mov ecx, dword [ebp + 8]
mov edx, dword [ebp + ecx*4 - 0x10]
push edx
call dword [sym.imp.KERNEL32.dll_GetEnvironmentVariableA]
mov dword [ebp - 0x14], eax
cmp dword [ebp - 0x14], 0
jne 0x4046fe
xor eax, eax
jmp 0x404724
cmp dword [ebp + 8], 1
jne 0x40471f
push 0x41a968
mov eax, dword [ebp - 4]
push eax
call fcn.0040a7d0
add esp, 8
test eax, eax
jne 0x40471f
mov ecx, dword [ebp - 4]
mov byte [ecx], 0
mov eax, 1
mov esp, ebp
pop ebp
ret

Function at 0x404faf
Capabilities:
Terminate process

Disassembly:
push ebp
mov ebp, esp
push 0x41acb0
call fcn.00407d40
add esp, 4
push 0x41acd0
call fcn.00407d40
add esp, 4
push 0
push 0x404f09
call dword [sym.imp.KERNEL32.dll_SetConsoleCtrlHandler]
cmp dword [0x41e400], 0
jne 0x404ffa
cmp dword [ebp + 8], 0xffffffff
jne 0x404ffa
cmp dword [0x41e438], 0x7f
je 0x404ffa
mov dword [ebp + 8], 1
jmp 0x405025
cmp dword [0x41e400], 0
jne 0x405025
cmp dword [0x41e438], 0x7f
jne 0x405025
cmp dword [0x41e43c], 0
jl 0x405025
cmp dword [0x41e43c], 0xa
jg 0x405025
mov dword [ebp + 8], 0
cmp dword [0x41e454], 0
je 0x405047
mov eax, dword [0x41e454]
push eax
call sub.ODBC32.dll_SQLDisconnect
mov ecx, dword [0x41e454]
push ecx
push 2
call sub.ODBC32.dll_SQLFreeHandle
cmp dword [0x41e450], 0
je 0x40505e
mov edx, dword [0x41e450]
push edx
push 1
call sub.ODBC32.dll_SQLFreeHandle
cmp dword [0x41e46c], 0
je 0x40507d
mov eax, dword [0x41e470]
cmp eax, dword [0x41e46c]
jl 0x40507d
mov ecx, dword [0x41e470]
mov dword [ebp + 8], ecx
mov edx, dword [ebp + 8]
push edx
call dword [sym.imp.KERNEL32.dll_ExitProcess]
Function at 0x405b10
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
push 0x41acd0
call fcn.00407d40
add esp, 4
push 0x41acb0
call fcn.00407d40
add esp, 4
cmp dword [0x41f6a4], 0
jne 0x405b4d
push 0xb9
push 0x41abc4
push str.NULL___hConsoleOutput
call fcn.00409720
add esp, 0xc
call fcn.0040580f
test eax, eax
je 0x405b7e
push 0
push 0x41e478
mov ecx, dword [ebp + 8]
push ecx
call fcn.004085b0
add esp, 4
shl eax, 1
push eax
mov edx, dword [ebp + 8]
push edx
mov eax, dword [0x41f6a4]
push eax
call dword [sym.imp.KERNEL32.dll_WriteFile]
jmp 0x405b9a
push 0x41e478
mov ecx, dword [0x41f6a4]
push ecx
push 0xffffffffffffffff
mov edx, dword [ebp + 8]
push edx
push 1
call fcn.00405b9c
add esp, 0x14
pop ebp
ret

Function at 0x405b9c
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x10c
mov dword [ebp - 8], 0x100
mov dword [ebp - 0xc], 0
cmp dword [ebp + 0x10], 0xffffffff
jne 0x405bc8
mov eax, dword [ebp + 0xc]
push eax
call fcn.004085b0
add esp, 4
mov dword [ebp + 0x10], eax
mov ecx, dword [ebp + 0x10]
shl ecx, 1
cmp ecx, dword [ebp - 8]
jle 0x405bf2
mov edx, dword [ebp + 0x10]
shl edx, 1
mov dword [ebp - 8], edx
mov eax, dword [ebp - 8]
push eax
call fcn.00407800
add esp, 4
mov dword [ebp - 4], eax
mov dword [ebp - 0xc], 1
jmp 0x405bfb
lea ecx, [ebp - 0x10c]
mov dword [ebp - 4], ecx
push 0
push 0
mov edx, dword [ebp - 8]
push edx
mov eax, dword [ebp - 4]
push eax
mov ecx, dword [ebp + 0x10]
push ecx
mov edx, dword [ebp + 0xc]
push edx
push 0
mov eax, dword [ebp + 8]
push eax
call dword [sym.imp.KERNEL32.dll_WideCharToMultiByte]
mov dword [ebp - 8], eax
push 0
mov ecx, dword [ebp + 0x18]
push ecx
mov edx, dword [ebp - 8]
push edx
mov eax, dword [ebp - 4]
push eax
mov ecx, dword [ebp + 0x14]
push ecx
call dword [sym.imp.KERNEL32.dll_WriteFile]
cmp dword [ebp - 0xc], 0
je 0x405c48
mov edx, dword [ebp - 4]
push edx
call fcn.004078b0
add esp, 4
mov eax, 1
mov esp, ebp
pop ebp
ret

Function at 0x405f02
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
push 0x41acd0
call fcn.00407d40
add esp, 4
push 0x41acb0
call fcn.00407d40
add esp, 4
call fcn.0040580f
test eax, eax
je 0x405f48
push 0
push 0x41e474
mov eax, dword [ebp + 0xc]
shl eax, 1
push eax
mov ecx, dword [ebp + 8]
push ecx
mov edx, dword [0x41f6a4]
push edx
call dword [sym.imp.KERNEL32.dll_WriteFile]
jmp 0x405f65
push 0x41e474
mov eax, dword [0x41f6a4]
push eax
mov ecx, dword [ebp + 0xc]
push ecx
mov edx, dword [ebp + 8]
push edx
push 1
call fcn.00405b9c
add esp, 0x14
pop ebp
ret
Function at 0x407600
Capabilities:
Accept command line arguments

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x4181a8
push 0x40b548
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 [0x41e5f4], edx
mov ecx, eax
and ecx, 0xff
mov dword [0x41e5f0], ecx
shl ecx, 8
add ecx, edx
mov dword [0x41e5ec], ecx
shr eax, 0x10
mov dword [0x41e5e8], eax
call fcn.0040b410
test eax, eax
jne 0x40766a
push 0x1c
call fcn.00407720
add esp, 4
mov dword [ebp - 4], 0
call fcn.0040b210
call fcn.00408b90
call dword [sym.imp.KERNEL32.dll_GetCommandLineA]
mov dword [0x420ce4], eax
call fcn.0040b0b0
mov dword [0x41e484], eax
test eax, eax
je 0x40769d
mov eax, dword [0x420ce4]
test eax, eax
jne 0x4076a7
push 0xffffffffffffffff
call fcn.00409140
add esp, 4
call fcn.0040ac00
call fcn.0040ab10
call fcn.00409110
mov eax, dword [0x41e604]
mov dword [0x41e608], eax
push eax
mov eax, dword [0x41e5fc]
push eax
mov ecx, dword [0x41e5f8]
push ecx
call section..text
add esp, 0xc
mov dword [ebp - 0x1c], eax
push eax
call fcn.00409140
jmp 0x407702
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 0x409180
Capabilities:
Terminate process

Disassembly:
mov eax, dword [0x41e624]
push ebx
push ebp
mov ebp, dword [esp + 0xc]
cmp eax, 1
push esi
jne 0x40919f
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 [0x41e620], 1
mov byte [0x41e61c], bl
jne 0x4091f9
mov ecx, dword [0x41fcc8]
test ecx, ecx
je 0x4091e7
mov esi, dword [0x41fcc4]
sub esi, 4
cmp esi, ecx
jb 0x4091e7
mov eax, dword [esi]
test eax, eax
je 0x4091e0
call eax
mov ecx, dword [0x41fcc8]
sub esi, 4
cmp esi, ecx
jae 0x4091d2
push 0x41a020
push 0x41a018
call fcn.00409230
add esp, 8
push 0x41a028
push 0x41a024
call fcn.00409230
add esp, 8
test ebx, ebx
jne 0x409220
push ebp
mov dword [0x41e624], 1
call dword [sym.imp.KERNEL32.dll_ExitProcess]
pop esi
pop ebp
pop ebx
ret

Function at 0x40a940
Capabilities:
Delete file

Disassembly:
mov eax, dword [esp + 4]
push eax
call dword [sym.imp.KERNEL32.dll_DeleteFileA]
test eax, eax
jne 0x40a957
call dword [sym.imp.KERNEL32.dll_GetLastError]
jmp 0x40a959
xor eax, eax
test eax, eax
je 0x40a96a
push eax
call fcn.0040c750
add esp, 4
or eax, 0xffffffff
ret
xor eax, eax
ret
Function at 0x40b0b0
Capabilities:
Query environment variable

Disassembly:
mov eax, dword [0x41e740]
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 0x40b0f2
call edi
mov esi, eax
test esi, esi
je 0x40b0dc
mov eax, 1
jmp 0x40b0ed
call ebp
mov ebx, eax
test ebx, ebx
je 0x40b1ff
mov eax, 2
mov dword [0x41e740], eax
cmp eax, 1
jne 0x40b192
test esi, esi
jne 0x40b10b
call edi
mov esi, eax
test esi, esi
je 0x40b1ff
cmp word [esi], 0
mov eax, esi
je 0x40b125
add eax, 2
cmp word [eax], 0
jne 0x40b113
add eax, 2
cmp word [eax], 0
jne 0x40b113
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 0x40b184
push edi
call fcn.00407800
mov ebx, eax
add esp, 4
test ebx, ebx
je 0x40b184
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 0x40b176
push ebx
call fcn.004078b0
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 0x40b1ff
test ebx, ebx
jne 0x40b1a3
call ebp
mov ebx, eax
test ebx, ebx
je 0x40b1ff
mov cl, byte [ebx]
mov eax, ebx
test cl, cl
je 0x40b1bb
mov cl, byte [eax + 1]
inc eax
test cl, cl
jne 0x40b1ab
mov cl, byte [eax + 1]
inc eax
test cl, cl
jne 0x40b1ab
sub eax, ebx
inc eax
mov esi, eax
push esi
call fcn.00407800
mov ebp, eax
add esp, 4
test ebp, ebp
jne 0x40b1dd
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 0x40b660
Capabilities:
Write file on windows

Disassembly:
mov ecx, dword [esp + 4]
sub esp, 0x1a8
mov eax, 0x41b108
push ebx
push ebp
push esi
push edi
xor ebp, ebp
cmp ecx, dword [eax]
je 0x40b684
add eax, 8
inc ebp
cmp eax, 0x41b198
jb 0x40b675
cmp ecx, dword [ebp*8 + 0x41b108]
jne 0x40b82b
mov eax, dword [0x41e48c]
cmp eax, 1
je 0x40b7ed
test eax, eax
jne 0x40b6b0
cmp dword [0x41ac88], 1
je 0x40b7ed
cmp ecx, 0xfc
je 0x40b82b
lea eax, [esp + 0xb4]
push 0x104
push eax
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
test eax, eax
jne 0x40b6eb
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 0x40b734
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 0x4181dc
add ebx, ecx
push ebx
call fcn.004087c0
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, 0x4181d4
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 + 0x41b10c]
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.0040f860
add esp, 0xc
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x1a8
ret
mov eax, dword [0x41fbc0]
test eax, eax
je 0x40b7fe
mov esi, dword [eax + 0x10]
cmp esi, 0xffffffff
jne 0x40b808
push 0xfffffffffffffff4
call dword [sym.imp.KERNEL32.dll_GetStdHandle]
mov esi, eax
mov edx, dword [ebp*8 + 0x41b10c]
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