joyce8/EMBER2024-capa huggingface dataset:
Function at 0x48e370
Capabilities:
Get socket status

Disassembly:
sub esp, 0x10c
mov eax, dword [ecx]
lea ecx, [esp]
push ecx
push 0
lea edx, [esp + 0x10]
push 0
push edx
push 0
mov dword [esp + 0x14], 0
mov dword [esp + 0x18], 0
mov dword [esp + 0x20], eax
mov dword [esp + 0x1c], 1
call sub.WS2_32.dll_select
cmp eax, 0xffffffff
jne 0x48e3b9
xor eax, eax
add esp, 0x10c
ret 4
mov edx, dword [esp + 0x110]
xor ecx, ecx
test eax, eax
setne cl
mov dword [edx], ecx
mov eax, 1
add esp, 0x10c
ret 4

Function at 0x48e830
Capabilities:
Access peb ldr_data

Disassembly:
push 0xffffffffffffffff
push 0x4b4120
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 8
push esi
mov esi, ecx
lea ecx, [esp + 4]
call fcn.0048e3e0
lea eax, [esp + 4]
lea ecx, [esi + 4]
push eax
mov dword [esp + 0x18], 0
call fcn.0048e460
lea ecx, [esp + 4]
push ecx
lea ecx, [esi + 0x14]
call fcn.0048e460
lea ecx, [esi + 0xc]
call fcn.004a2db6
lea ecx, [esi + 0x10]
call fcn.004a2db6
push 0xffffffffffffffff
push 0
lea ecx, [esi + 0x1c]
call fcn.0048f9f0
push 0xffffffffffffffff
push 0
lea ecx, [esi + 0x30]
call fcn.0048f9f0
push 0xffffffffffffffff
push 0
lea ecx, [esi + 0x44]
call fcn.0048f9f0
lea ecx, [esp + 8]
mov dword [esp + 0x14], 1
call fcn.004a2e2b
lea ecx, [esp + 4]
mov dword [esp + 0x14], 0xffffffff
call fcn.004a2e2b
mov ecx, dword [esp + 0xc]
pop esi
mov dword fs:[0], ecx
add esp, 0x14
ret
Function at 0x4a520b
Capabilities:
Get graphical window text

Disassembly:
push esi
mov esi, ecx
mov ecx, dword [esi + 0x38]
test ecx, ecx
jne 0x4a5243
push dword [esi + 0x1c]
call dword [sym.imp.USER32.dll_GetWindowTextLengthA]
lea ecx, [eax + 1]
push ecx
mov ecx, dword [esp + 0xc]
push eax
call fcn.004a3286
push eax
push dword [esi + 0x1c]
call dword [sym.imp.USER32.dll_GetWindowTextA]
mov ecx, dword [esp + 8]
push 0xffffffffffffffff
call fcn.004a325e
jmp 0x4a524f
mov eax, dword [ecx]
push dword [esp + 8]
call dword [eax + 0x88]
pop esi
ret 4

Function at 0x4a6a02
Capabilities:
Extract resource via kernel32 functions

Disassembly:
push ebx
push esi
push edi
xor edi, edi
cmp dword [esp + 0x10], edi
mov ebx, ecx
je 0x4a6a44
call fcn.004acef7
mov esi, dword [eax + 0xc]
push 0xf0
push dword [esp + 0x14]
push esi
call dword [sym.imp.KERNEL32.dll_FindResourceA]
cmp eax, edi
je 0x4a6a44
push eax
push esi
call dword [sym.imp.KERNEL32.dll_LoadResource]
cmp eax, edi
jne 0x4a6a3b
xor eax, eax
jmp 0x4a6a4c
push eax
call dword [sym.imp.KERNEL32.dll_LockResource]
mov edi, eax
push edi
mov ecx, ebx
call fcn.004a6a52
pop edi
pop esi
pop ebx
ret 4

Function at 0x4ad427
Capabilities:
Get thread local storage value

Disassembly:
push ebx
push esi
mov esi, ecx
lea ebx, [esi + 0x1c]
push ebx
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
cmp dword [esp + 0x10], 0
jne 0x4ad455
push dword [esi]
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
test eax, eax
je 0x4ad473
push dword [esp + 0xc]
mov ecx, esi
push eax
call fcn.004ad38d
jmp 0x4ad473
mov eax, dword [esi + 0x14]
test eax, eax
je 0x4ad473
push edi
push dword [esp + 0x10]
mov edi, dword [eax + 4]
mov ecx, esi
push eax
call fcn.004ad38d
test edi, edi
mov eax, edi
jne 0x4ad45d
pop edi
push ebx
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
pop esi
pop ebx
ret 8
Function at 0x401640
Capabilities:
Check if file exists
Get file attributes

Disassembly:
mov eax, dword [esp + 4]
push eax
call dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
cmp eax, 0xffffffff
jne 0x401663
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
call fcn.004019f0
add esp, 4
or eax, 0xffffffff
ret
test al, 1
je 0x401686
test byte [esp + 8], 2
je 0x401686
mov dword [0x408aec], 0xd
mov dword [0x408af0], 5
or eax, 0xffffffff
ret
xor eax, eax
ret

Function at 0x4016e0
Capabilities:
Accept command line arguments

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push section..rdata
push 0x4029c8
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 [0x408b04], edx
mov ecx, eax
and ecx, 0xff
mov dword [0x408b00], ecx
shl ecx, 8
add ecx, edx
mov dword [0x408afc], ecx
shr eax, 0x10
mov dword [0x408af8], eax
call fcn.00402890
test eax, eax
jne 0x40174a
push 0x1c
call fcn.00401880
add esp, 4
mov dword [ebp - 4], 0
call fcn.00402690
call fcn.00402680
call dword [sym.imp.KERNEL32.dll_GetCommandLineA]
mov dword [0x409ef0], eax
call fcn.00402250
mov dword [0x408ae0], eax
test eax, eax
je 0x40177d
mov eax, dword [0x409ef0]
test eax, eax
jne 0x401787
push 0xffffffffffffffff
call fcn.004018e0
add esp, 4
call fcn.00401fa0
call fcn.00401eb0
call fcn.004018b0
mov esi, dword [0x409ef0]
mov dword [ebp - 0x64], esi
cmp byte [esi], 0x22
jne 0x401866
inc esi
mov dword [ebp - 0x64], esi
mov al, byte [esi]
cmp al, 0x22
je 0x4017ce
test al, al
je 0x4017ce
and eax, 0xff
push eax
call fcn.00401e50
add esp, 4
test eax, eax
je 0x4017a8
inc esi
mov dword [ebp - 0x64], esi
jmp 0x4017a8
cmp byte [esi], 0x22
jne 0x4017d7
inc esi
mov dword [ebp - 0x64], esi
mov al, byte [esi]
test al, al
je 0x4017e7
cmp al, 0x20
ja 0x4017e7
inc esi
mov dword [ebp - 0x64], esi
jmp 0x4017d7
mov dword [ebp - 0x30], 0
lea eax, [ebp - 0x5c]
push eax
call dword [sym.imp.KERNEL32.dll_GetStartupInfoA]
test byte [ebp - 0x30], 1
je 0x401808
mov eax, dword [ebp - 0x2c]
and eax, 0xffff
jmp 0x40180d
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.004018e0
jmp 0x40184b
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 0x4017d7
inc esi
mov dword [ebp - 0x64], esi
jmp 0x401866
Function at 0x401920
Capabilities:
Terminate process

Disassembly:
mov eax, dword [0x408b34]
push ebx
push ebp
mov ebp, dword [esp + 0xc]
cmp eax, 1
push esi
jne 0x40193f
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 [0x408b30], 1
mov byte [0x408b2c], bl
jne 0x401999
mov ecx, dword [0x409ee8]
test ecx, ecx
je 0x401987
mov esi, dword [0x409ee4]
sub esi, 4
cmp esi, ecx
jb 0x401987
mov eax, dword [esi]
test eax, eax
je 0x401980
call eax
mov ecx, dword [0x409ee8]
sub esi, 4
cmp esi, ecx
jae 0x401972
push 0x40601c
push 0x406014
call fcn.004019d0
add esp, 8
push 0x406024
push 0x406020
call fcn.004019d0
add esp, 8
test ebx, ebx
jne 0x4019c0
push ebp
mov dword [0x408b34], 1
call dword [sym.imp.KERNEL32.dll_ExitProcess]
pop esi
pop ebp
pop ebx
ret

Function at 0x402250
Capabilities:
Query environment variable

Disassembly:
mov eax, dword [0x408c48]
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 0x402292
call edi
mov esi, eax
test esi, esi
je 0x40227c
mov eax, 1
jmp 0x40228d
call ebp
mov ebx, eax
test ebx, ebx
je 0x40239f
mov eax, 2
mov dword [0x408c48], eax
cmp eax, 1
jne 0x402332
test esi, esi
jne 0x4022ab
call edi
mov esi, eax
test esi, esi
je 0x40239f
cmp word [esi], 0
mov eax, esi
je 0x4022c5
add eax, 2
cmp word [eax], 0
jne 0x4022b3
add eax, 2
cmp word [eax], 0
jne 0x4022b3
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 0x402324
push edi
call fcn.00403160
mov ebx, eax
add esp, 4
test ebx, ebx
je 0x402324
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 0x402316
push ebx
call fcn.00403210
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 0x40239f
test ebx, ebx
jne 0x402343
call ebp
mov ebx, eax
test ebx, ebx
je 0x40239f
mov cl, byte [ebx]
mov eax, ebx
test cl, cl
je 0x40235b
mov cl, byte [eax + 1]
inc eax
test cl, cl
jne 0x40234b
mov cl, byte [eax + 1]
inc eax
test cl, cl
jne 0x40234b
sub eax, ebx
inc eax
mov esi, eax
push esi
call fcn.00403160
mov ebp, eax
add esp, 4
test ebp, ebp
jne 0x40237d
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 0x402ae0
Capabilities:
Write file on windows

Disassembly:
mov ecx, dword [esp + 4]
sub esp, 0x1a8
mov eax, 0x406598
push ebx
push ebp
push esi
push edi
xor ebp, ebp
cmp ecx, dword [eax]
je 0x402b04
add eax, 8
inc ebp
cmp eax, 0x406628
jb 0x402af5
cmp ecx, dword [ebp*8 + 0x406598]
jne 0x402cab
mov eax, dword [0x408ae8]
cmp eax, 1
je 0x402c6d
test eax, eax
jne 0x402b30
cmp dword [0x406288], 1
je 0x402c6d
cmp ecx, 0xfc
je 0x402cab
lea eax, [esp + 0xb4]
push 0x104
push eax
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
test eax, eax
jne 0x402b6b
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 0x402bb4
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 0x4052e0
add ebx, ecx
push ebx
call fcn.00403a10
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, 0x4052c0
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 + 0x40659c]
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.00403980
add esp, 0xc
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x1a8
ret
mov eax, dword [0x409de0]
test eax, eax
je 0x402c7e
mov esi, dword [eax + 0x10]
cmp esi, 0xffffffff
jne 0x402c88
push 0xfffffffffffffff4
call dword [sym.imp.KERNEL32.dll_GetStdHandle]
mov esi, eax
mov edx, dword [ebp*8 + 0x40659c]
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 0x403d70
Capabilities:
Clear file content

Disassembly:
mov eax, 0x1004
call fcn.004048f0
mov eax, dword [0x409ee0]
push ebx
mov ebx, dword [esp + 0x100c]
push ebp
xor ebp, ebp
push esi
cmp ebx, eax
push edi
jae 0x403ed2
mov eax, ebx
mov ecx, ebx
sar eax, 5
and ecx, 0x1f
mov edx, dword [eax*4 + 0x409de0]
test byte [edx + ecx*8 + 4], 1
je 0x403ed2
push 1
push ebp
push ebx
call fcn.00404230
mov edi, eax
add esp, 0xc
cmp edi, 0xffffffff
mov dword [esp + 0x10], edi
je 0x403edc
push 2
push ebp
push ebx
call fcn.00404230
add esp, 0xc
cmp eax, 0xffffffff
je 0x403edc
mov ecx, dword [esp + 0x101c]
mov esi, ecx
sub esi, eax
test esi, esi
jle 0x403e78
mov ecx, 0x400
xor eax, eax
lea edi, [esp + 0x14]
push 0x8000
rep stosd dword es:[edi], eax
push ebx
call fcn.00404870
add esp, 8
mov edi, eax
cmp esi, 0x1000
mov eax, 0x1000
jge 0x403e1f
mov eax, esi
push eax
lea eax, [esp + 0x18]
push eax
push ebx
call fcn.00404650
add esp, 0xc
cmp eax, 0xffffffff
je 0x403e3b
sub esi, eax
test esi, esi
jle 0x403e51
jmp 0x403e10
cmp dword [0x408af0], 5
jne 0x403e4e
mov dword [0x408aec], 0xd
or ebp, 0xffffffff
push edi
push ebx
call fcn.00404870
mov edi, dword [esp + 0x18]
add esp, 8
push 0
push edi
push ebx
call fcn.00404230
add esp, 0xc
mov eax, ebp
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x1004
ret
jge 0x403eb9
push 0
push ecx
push ebx
call fcn.00404230
add esp, 0xc
push ebx
call fcn.00404500
add esp, 4
push eax
call dword [sym.imp.KERNEL32.dll_SetEndOfFile]
mov ebp, eax
neg ebp
sbb ebp, ebp
neg ebp
dec ebp
cmp ebp, 0xffffffff
jne 0x403eb9
mov dword [0x408aec], 0xd
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [0x408af0], eax
push 0
push edi
push ebx
call fcn.00404230
add esp, 0xc
mov eax, ebp
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x1004
ret
mov dword [0x408aec], 9
pop edi
pop esi
pop ebp
or eax, 0xffffffff
pop ebx
add esp, 0x1004
ret
Function at 0x404650
Capabilities:
Write file on windows

Disassembly:
mov eax, dword [esp + 4]
mov ecx, dword [0x409ee0]
sub esp, 0x41c
cmp eax, ecx
push ebx
push ebp
push esi
push edi
jae 0x4047fd
mov ecx, eax
mov esi, eax
sar ecx, 5
and esi, 0x1f
mov edx, dword [ecx*4 + 0x409de0]
lea edi, [ecx*4 + 0x409de0]
shl esi, 3
mov dword [esp + 0x24], edi
mov dword [esp + 0x14], esi
mov cl, byte [esi + edx + 4]
test cl, 1
je 0x4047fd
mov ebx, dword [esp + 0x438]
xor ebp, ebp
cmp ebx, ebp
mov dword [esp + 0x10], ebp
mov dword [esp + 0x20], ebp
jne 0x4046be
xor eax, eax
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x41c
ret
test cl, 0x20
je 0x4046cf
push 2
push ebp
push eax
call fcn.00404230
add esp, 0xc
mov eax, dword [edi]
add eax, esi
test byte [eax + 4], 0x80
je 0x40482e
mov ebp, dword [esp + 0x434]
mov dword [esp + 0x18], 0
test ebx, ebx
mov edi, ebp
jbe 0x404779
lea eax, [esp + 0x28]
mov ecx, edi
sub ecx, ebp
cmp ecx, ebx
jae 0x40472a
mov cl, byte [edi]
inc edi
cmp cl, 0xa
jne 0x404717
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 0x4046fa
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 0x40481f
mov eax, dword [esp + 0x1c]
mov edx, dword [esp + 0x10]
add edx, eax
cmp eax, esi
mov dword [esp + 0x10], edx
jl 0x404775
mov eax, edi
sub eax, ebp
cmp eax, ebx
jb 0x4046f6
mov esi, dword [esp + 0x14]
mov eax, dword [esp + 0x10]
test eax, eax
jne 0x4047ee
mov eax, dword [esp + 0x18]
test eax, eax
je 0x4047c2
cmp eax, 5
jne 0x4047ab
mov dword [0x408af0], eax
mov dword [0x408aec], 9
or eax, 0xffffffff
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x41c
ret
push eax
call fcn.004019f0
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 0x4047e2
cmp byte [ebp], 0x1a
jne 0x4047e2
xor eax, eax
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x41c
ret
mov dword [0x408aec], 0x1c
jmp 0x404807
sub eax, dword [esp + 0x20]
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x41c
ret
mov dword [0x408aec], 9
pop edi
pop esi
pop ebp
mov dword [0x408af0], 0
or eax, 0xffffffff
pop ebx
add esp, 0x41c
ret
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [esp + 0x18], eax
jmp 0x404775
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 0x40485f
mov eax, dword [esp + 0x1c]
mov dword [esp + 0x18], 0
mov dword [esp + 0x10], eax
jmp 0x404779
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [esp + 0x18], eax
jmp 0x404779
Function at 0x401000
Capabilities:
Encode data using xor

Disassembly:
mov eax, 0x558db4
push eax
push dword fs:[0]
push ebp
add byte [eax + 0x64], dl
push dword [0]
mov dword fs:[0], esp
xor eax, eax
mov dword [eax], ecx
push eax
inc ebp
inc ebx
outsd dx, dword [esi]
insd dword es:[edi], dx
jo 0x401080
arpl word [edx + esi], si
adc ebx, dword [edi - 0x54]
xchg ebx, eax
neg dl
push cs
dec ecx
mov eax, 0x7fb97088
add ah, ah
aam 0xe7
mov dword [0x98c0ec09], eax
mov eax, dword [0xf6a8b15c]
jecxz 0x401003
xor dword [ecx], ecx
iretd
ljmp 0x2bdb:0xc41a7522
jne 0x40109c
invalid
mov ch, byte [edx + 0x477bf67f]
jle 0x4010d4
salc
rcr cl, 1
cwde
add al, 0x60
sub byte [ecx + 0x485b75a6], bh
adc byte [eax], cl
xor eax, 0x4156615a
clc
or edi, dword [esi + 0x54]
xchg byte [ebx + 0x456a3141], bl
adc dword [edx + 0x30], ecx
jno 0x401110
sbb ebx, edi
cmp al, 0x6e
jae 0x40107e
out dx, al
aad 0x69
sub dword [edi + 0x33], ebx
retf
push ebp
mov cs, edx
mov bl, byte [edx + 0x3812e7a7]
adc eax, 0x31bdc80d
movsd dword es:[edi], dword [esi]
fild qword [eax]
add ch, al
cmpsd dword [esi], dword es:[edi]
dec eax
ret
Function at 0x402f50
Capabilities:
Accept command line arguments

Disassembly:
push ebx
push esi
add esp, 0xfffffef4
mov ebx, edx
mov esi, eax
mov eax, ebx
call fcn.00404d3c
test esi, esi
jne 0x402f87
push 0x105
lea eax, [esp + 8]
push eax
push 0
call sub.kernel32.dll_GetModuleFileNameA
mov ecx, eax
lea edx, [esp + 4]
mov eax, ebx
call fcn.00404e2c
jmp 0x402fa8
call sub.kernel32.dll_GetCommandLineA
mov dword [esp], eax
mov edx, ebx
mov eax, dword [esp]
call fcn.00402dec
mov dword [esp], eax
test esi, esi
je 0x402fa8
cmp dword [ebx], 0
je 0x402fa8
dec esi
jmp 0x402f8f
add esp, 0x10c
pop esi
pop ebx
ret

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

Disassembly:
push ebx
xor ebx, ebx
imul edx, dword [ebx + 0x4ce008], 0x8088405
inc edx
mov dword [ebx + 0x4ce008], edx
mul edx
mov eax, edx
pop ebx
ret

Function at 0x403d98
Capabilities:
Query or enumerate registry value

Disassembly:
push ebp
mov ebp, esp
add esp, 0xfffffff4
movzx eax, word [0x4ce024]
mov dword [ebp - 8], eax
lea eax, [ebp - 4]
push eax
push 1
push 0
push 0x403e30
push 0x80000002
call sub.advapi32.dll_RegOpenKeyExA
test eax, eax
jne 0x403e10
xor eax, eax
push ebp
push 0x403e09
push dword fs:[eax]
mov dword fs:[eax], esp
mov dword [ebp - 0xc], 4
lea eax, [ebp - 0xc]
push eax
lea eax, [ebp - 8]
push eax
push 0
push 0
push 0x403e4c
mov eax, dword [ebp - 4]
push eax
call sub.advapi32.dll_RegQueryValueExA
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x403e10
mov eax, dword [ebp - 4]
push eax
call sub.advapi32.dll_RegCloseKey
ret
mov ax, word [0x4ce024]
and ax, 0xffc0
mov dx, word [ebp - 8]
and dx, 0x3f
or ax, dx
mov word [0x4ce024], ax
mov esp, ebp
pop ebp
ret

Function at 0x404b34
Capabilities:
Write file on windows

Disassembly:
push ecx
cmp byte [0x4d204c], 0
je 0x404b95
cmp word [0x4d2220], 0xd7b2
jne 0x404b5d
cmp dword [0x4d2228], 0
jbe 0x404b5d
mov eax, 0x4d221c
call dword [0x4d2238]
push 0
lea eax, [esp + 4]
push eax
push 0x1e
push 0x4ce094
push 0xfffffffffffffff5
call sub.kernel32.dll_GetStdHandle
push eax
call sub.kernel32.dll_WriteFile
push 0
lea eax, [esp + 4]
push eax
push 2
push 0x404bbc
push 0xfffffffffffffff5
call sub.kernel32.dll_GetStdHandle
push eax
call sub.kernel32.dll_WriteFile
pop edx
ret
cmp byte [0x4ce034], 0
jne 0x404bb1
push 0
push 0x4ce08c
push 0x4ce094
push 0
call sub.user32.dll_MessageBoxA
pop edx
ret

Function at 0x404cf0
Capabilities:
Create thread

Disassembly:
push ebp
mov ebp, esp
push ebx
push esi
push edi
mov edi, ecx
mov esi, edx
mov ebx, eax
mov eax, 8
call fcn.00402b80
mov dword [eax], edi
mov edx, dword [ebp + 0x10]
mov dword [eax + 4], edx
mov byte [0x4d204d], 1
mov edx, dword [ebp + 8]
push edx
mov edx, dword [ebp + 0xc]
push edx
push eax
mov eax, 0x404cb8
push eax
push esi
push ebx
call sub.kernel32.dll_CreateThread
pop edi
pop esi
pop ebx
pop ebp
ret 0xc
Function at 0x406d70
Capabilities:
Get geographical location

Disassembly:
push ebp
mov ebp, esp
add esp, 0xfffffff0
push ebx
xor edx, edx
mov dword [ebp - 0x10], edx
xor edx, edx
push ebp
push 0x406dd6
push dword fs:[edx]
mov dword fs:[edx], esp
push 7
lea edx, [ebp - 0xb]
push edx
push 0x1004
push eax
call sub.kernel32.dll_GetLocaleInfoA
lea eax, [ebp - 0x10]
lea edx, [ebp - 0xb]
mov ecx, 7
call fcn.00404fac
mov eax, dword [ebp - 0x10]
lea edx, [ebp - 4]
call fcn.00403904
mov ebx, eax
cmp dword [ebp - 4], 0
je 0x406dc0
xor ebx, ebx
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x406ddd
lea eax, [ebp - 0x10]
call fcn.00404d3c
ret

Function at 0x409b08
Capabilities:
Check if file exists
Get file attributes

Disassembly:
push ebx
mov ebx, eax
mov eax, ebx
call fcn.004051fc
push eax
call sub.kernel32.dll_GetFileAttributesA
cmp eax, 0xffffffff
je 0x409b21
test al, 0x10
jne 0x409b25
xor eax, eax
pop ebx
ret
mov al, 1
pop ebx
ret

Function at 0x40c82c
Capabilities:
Get geographical location

Disassembly:
push ebp
mov ebp, esp
add esp, 0xffffff00
push ebx
push esi
mov esi, ecx
mov ebx, dword [ebp + 8]
push pe_nt_image_headers32
lea ecx, [ebp - 0x100]
push ecx
push edx
push eax
call sub.kernel32.dll_GetLocaleInfoA_1
test eax, eax
jle 0x40c865
mov ecx, eax
dec ecx
lea edx, [ebp - 0x100]
mov eax, ebx
call fcn.00404e2c
jmp 0x40c86e
mov eax, ebx
mov edx, esi
call fcn.00404d90
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 4

Function at 0x40c878
Capabilities:
Get geographical location

Disassembly:
push ebx
push esi
push edi
push ecx
mov ebx, ecx
mov esi, edx
mov edi, eax
push 2
lea eax, [esp + 4]
push eax
push esi
push edi
call sub.kernel32.dll_GetLocaleInfoA_1
test eax, eax
jle 0x40c899
mov al, byte [esp]
jmp 0x40c89b
mov eax, ebx
pop edx
pop edi
pop esi
pop ebx
ret

Function at 0x40cf30
Capabilities:
Write file on windows

Disassembly:
add esp, 0xfffffbbc
push 0x400
lea ecx, [esp + 0x48]
call 0x40cd98
mov eax, dword [0x4d1074]
cmp byte [eax], 0
je 0x40cfac
mov eax, dword [0x4d0cd4]
call fcn.004033d8
call fcn.00402d0c
lea eax, [esp + 0x44]
push eax
lea eax, [esp + 0x48]
push eax
call sub.user32.dll_CharToOemA
push 0
lea eax, [esp + 4]
push eax
lea eax, [esp + 0x4c]
call fcn.00409e5c
push eax
lea eax, [esp + 0x50]
push eax
push 0xfffffffffffffff4
call sub.kernel32.dll_GetStdHandle_1
push eax
call sub.kernel32.dll_WriteFile_1
push 0
lea eax, [esp + 4]
push eax
push 2
push 0x40cff4
push 0xfffffffffffffff4
call sub.kernel32.dll_GetStdHandle_1
push eax
call sub.kernel32.dll_WriteFile_1
jmp 0x40cfe2
push 0x40
lea eax, [esp + 8]
push eax
mov eax, dword [0x4d0c50]
mov eax, dword [eax + 4]
push eax
mov eax, dword [0x4d2668]
call fcn.004061c0
push eax
call sub.user32.dll_LoadStringA_1
push 0x2010
lea eax, [esp + 8]
push eax
lea eax, [esp + 0x4c]
push eax
push 0
call sub.user32.dll_MessageBoxA_1
add esp, 0x444
ret