joyce8/EMBER2024-capa huggingface dataset:
Function at 0x42159f
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x10
mov ecx, dword [ebp + 8]
push ebx
mov ebx, dword [ebp + 0xc]
push esi
push edi
xor edi, edi
cmp dword [ebp + 0x10], edi
mov dword [ebp - 8], ecx
mov dword [ebp - 4], ebx
je 0x4215dc
cmp dword [ebp + 0x14], edi
je 0x4215dc
cmp ecx, edi
jne 0x4215e3
call fcn.0042197f
push edi
push edi
push edi
push edi
mov dword [eax], 0x16
push edi
call fcn.00422df7
add esp, 0x14
xor eax, eax
pop edi
pop esi
pop ebx
leave
ret
mov esi, dword [ebp + 0x18]
cmp esi, edi
je 0x4215f7
or eax, 0xffffffff
xor edx, edx
div dword [ebp + 0x10]
cmp dword [ebp + 0x14], eax
jbe 0x421618
cmp ebx, 0xffffffff
je 0x421607
push ebx
push edi
push ecx
call fcn.004232b0
add esp, 0xc
cmp esi, edi
je 0x4215c4
or eax, 0xffffffff
xor edx, edx
div dword [ebp + 0x10]
cmp dword [ebp + 0x14], eax
ja 0x4215c4
mov edi, dword [ebp + 0x10]
imul edi, dword [ebp + 0x14]
test word [esi + 0xc], 0x10c
mov dword [ebp - 0x10], edi
mov ebx, edi
je 0x421634
mov eax, dword [esi + 0x18]
mov dword [ebp - 0xc], eax
jmp 0x42163b
mov dword [ebp - 0xc], 0x1000
test edi, edi
je 0x42172c
test word [esi + 0xc], 0x10c
je 0x42168f
mov eax, dword [esi + 4]
test eax, eax
je 0x42168f
jl 0x42178d
cmp ebx, eax
mov edi, ebx
jb 0x421660
mov edi, eax
cmp edi, dword [ebp - 4]
ja 0x421734
push edi
push dword [esi]
push dword [ebp - 4]
push dword [ebp - 8]
call fcn.00420828
sub dword [esi + 4], edi
add dword [esi], edi
add dword [ebp - 8], edi
sub ebx, edi
add esp, 0x10
sub dword [ebp - 4], edi
mov edi, dword [ebp - 0x10]
jmp 0x421724
cmp ebx, dword [ebp - 0xc]
jb 0x4216fc
cmp dword [ebp - 0xc], 0
je 0x4216b9
mov ecx, 0x7fffffff
xor edx, edx
cmp ebx, ecx
jbe 0x4216ae
mov eax, ecx
div dword [ebp - 0xc]
mov eax, ecx
jmp 0x4216b5
mov eax, ebx
div dword [ebp - 0xc]
mov eax, ebx
sub eax, edx
jmp 0x4216c4
mov eax, 0x7fffffff
cmp ebx, eax
ja 0x4216c4
mov eax, ebx
cmp eax, dword [ebp - 4]
ja 0x421760
push eax
push dword [ebp - 8]
push esi
call fcn.0042bded
pop ecx
push eax
call fcn.0042bcf0
add esp, 0xc
test eax, eax
je 0x42179f
cmp eax, 0xffffffff
je 0x42178d
add dword [ebp - 8], eax
sub ebx, eax
sub dword [ebp - 4], eax
jmp 0x421724
push esi
call fcn.0042b60f
cmp eax, 0xffffffff
pop ecx
je 0x421791
cmp dword [ebp - 4], 0
je 0x421760
mov ecx, dword [ebp - 8]
inc dword [ebp - 8]
mov byte [ecx], al
mov eax, dword [esi + 0x18]
dec ebx
dec dword [ebp - 4]
mov dword [ebp - 0xc], eax
test ebx, ebx
jne 0x421643
mov eax, dword [ebp + 0x14]
jmp 0x4215de
xor esi, esi
cmp dword [ebp + 0xc], 0xffffffff
je 0x42174b
push dword [ebp + 0xc]
push esi
push dword [ebp + 8]
call fcn.004232b0
add esp, 0xc
call fcn.0042197f
push esi
push esi
push esi
push esi
mov dword [eax], 0x22
push esi
jmp 0x4215d4
cmp dword [ebp + 0xc], 0xffffffff
je 0x421776
push dword [ebp + 0xc]
push 0
push dword [ebp + 8]
call fcn.004232b0
add esp, 0xc
call fcn.0042197f
mov dword [eax], 0x22
xor eax, eax
push eax
push eax
push eax
push eax
push eax
jmp 0x4215d4
or dword [esi + 0xc], 0x20
mov eax, edi
sub eax, ebx
xor edx, edx
div dword [ebp + 0x10]
jmp 0x4215de
or dword [esi + 0xc], 0x10
jmp 0x421791
Function at 0x425c06
Capabilities:
Write file on windows

Disassembly:
push ecx
push ebx
mov ebx, dword [esp + 0xc]
push esi
push edi
xor esi, esi
xor edi, edi
cmp ebx, dword [edi*8 + 0x44ee00]
je 0x425c21
inc edi
cmp edi, 0x17
jb 0x425c12
cmp edi, 0x17
jae 0x425da1
push ebp
push 3
call fcn.00431b7f
cmp eax, 1
pop ecx
je 0x425d6d
push 3
call fcn.00431b7f
test eax, eax
pop ecx
jne 0x425c55
cmp dword [0x44ec14], 1
je 0x425d6d
cmp ebx, 0xfc
je 0x425da0
push str.Runtime_Error__n_nProgram:
mov ebx, 0x314
push ebx
mov ebp, 0x453348
push ebp
call fcn.00421116
add esp, 0xc
test eax, eax
je 0x425c8b
push esi
push esi
push esi
push esi
push esi
call fcn.00422cfb
add esp, 0x14
push 0x104
mov esi, 0x453361
push esi
push 0
mov byte [0x453465], 0
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
test eax, eax
jne 0x425ccf
push str._program_name_unknown_
push 0x2fb
push esi
call fcn.00421116
add esp, 0xc
test eax, eax
je 0x425ccf
xor eax, eax
push eax
push eax
push eax
push eax
push eax
call fcn.00422cfb
add esp, 0x14
push esi
call fcn.00428790
inc eax
cmp eax, 0x3c
pop ecx
jbe 0x425d14
push esi
call fcn.00428790
sub esi, 0x3b
add eax, esi
push 3
mov ecx, 0x45365c
push 0x441cc4
sub ecx, eax
push ecx
push eax
call fcn.004226ea
add esp, 0x14
test eax, eax
je 0x425d14
xor esi, esi
push esi
push esi
push esi
push esi
push esi
call fcn.00422cfb
add esp, 0x14
jmp 0x425d16
xor esi, esi
push 0x441cc0
push ebx
push ebp
call fcn.00422aee
add esp, 0xc
test eax, eax
je 0x425d36
push esi
push esi
push esi
push esi
push esi
call fcn.00422cfb
add esp, 0x14
push dword [edi*8 + 0x44ee04]
push ebx
push ebp
call fcn.00422aee
add esp, 0xc
test eax, eax
je 0x425d58
push esi
push esi
push esi
push esi
push esi
call fcn.00422cfb
add esp, 0x14
push 0x12010
push str.Microsoft_Visual_C_Runtime_Library
push ebp
call fcn.004319c2
add esp, 0xc
jmp 0x425da0
push 0xfffffffffffffff4
call dword [sym.imp.KERNEL32.dll_GetStdHandle]
mov ebp, eax
cmp ebp, esi
je 0x425da0
cmp ebp, 0xffffffff
je 0x425da0
push 0
lea eax, [esp + 0x14]
push eax
lea esi, [edi*8 + 0x44ee04]
push dword [esi]
call fcn.00428790
pop ecx
push eax
push dword [esi]
push ebp
call dword [sym.imp.KERNEL32.dll_WriteFile]
pop ebp
pop edi
pop esi
pop ebx
pop ecx
ret
Function at 0x4319c2
Capabilities:
Link many functions at runtime

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x20
push ebx
push esi
push edi
call fcn.004267ca
xor ebx, ebx
cmp dword [0x453e50], ebx
mov dword [ebp - 8], eax
mov dword [ebp - 4], ebx
mov dword [ebp - 0xc], ebx
mov dword [ebp - 0x10], ebx
jne 0x431a98
push str.USER32.DLL
call dword [sym.imp.KERNEL32.dll_LoadLibraryA]
mov edi, eax
cmp edi, ebx
je 0x431b78
mov esi, dword [sym.imp.KERNEL32.dll_GetProcAddress]
push str.MessageBoxA
push edi
call esi
cmp eax, ebx
je 0x431b78
push eax
call fcn.0042675c
mov dword [esp], 0x44210c
push edi
mov dword [0x453e50], eax
call esi
push eax
call fcn.0042675c
mov dword [esp], 0x4420f8
push edi
mov dword [0x453e54], eax
call esi
push eax
call fcn.0042675c
mov dword [0x453e58], eax
lea eax, [ebp - 0xc]
push eax
call fcn.004254c8
test eax, eax
pop ecx
pop ecx
je 0x431a66
push ebx
push ebx
push ebx
push ebx
push ebx
call fcn.00422cfb
add esp, 0x14
cmp dword [ebp - 0xc], 2
jne 0x431a98
push str.GetUserObjectInformationA
push edi
call esi
push eax
call fcn.0042675c
cmp eax, ebx
pop ecx
mov dword [0x453e60], eax
je 0x431a98
push str.GetProcessWindowStation
push edi
call esi
push eax
call fcn.0042675c
pop ecx
mov dword [0x453e5c], eax
mov eax, dword [0x453e5c]
mov ecx, dword [ebp - 8]
cmp eax, ecx
je 0x431b1d
cmp dword [0x453e60], ecx
je 0x431b1d
push eax
call fcn.004267d3
push dword [0x453e60]
mov esi, eax
call fcn.004267d3
cmp esi, ebx
pop ecx
pop ecx
mov edi, eax
je 0x431b1d
cmp edi, ebx
je 0x431b1d
call esi
cmp eax, ebx
je 0x431aea
lea ecx, [ebp - 0x14]
push ecx
push 0xc
lea ecx, [ebp - 0x20]
push ecx
push 1
push eax
call edi
test eax, eax
je 0x431aea
test byte [ebp - 0x18], 1
jne 0x431b1d
lea eax, [ebp - 0x10]
push eax
call fcn.004254ff
test eax, eax
pop ecx
je 0x431b05
push ebx
push ebx
push ebx
push ebx
push ebx
call fcn.00422cfb
add esp, 0x14
cmp dword [ebp - 0x10], 4
jb 0x431b14
or dword [ebp + 0x10], 0x200000
jmp 0x431b58
or dword [ebp + 0x10], 0x40000
jmp 0x431b58
mov eax, dword [0x453e54]
cmp eax, dword [ebp - 8]
je 0x431b58
push eax
call fcn.004267d3
cmp eax, ebx
pop ecx
je 0x431b58
call eax
cmp eax, ebx
mov dword [ebp - 4], eax
je 0x431b58
mov eax, dword [0x453e58]
cmp eax, dword [ebp - 8]
je 0x431b58
push eax
call fcn.004267d3
cmp eax, ebx
pop ecx
je 0x431b58
push dword [ebp - 4]
call eax
mov dword [ebp - 4], eax
push dword [0x453e50]
call fcn.004267d3
cmp eax, ebx
pop ecx
je 0x431b78
push dword [ebp + 0x10]
push dword [ebp + 0xc]
push dword [ebp + 8]
push dword [ebp - 4]
call eax
jmp 0x431b7a
xor eax, eax
pop edi
pop esi
pop ebx
leave
ret
Function at 0x43c1a0
Capabilities:
Execute syscall

Disassembly:
mov edx, esp
sysenter
ret
Function at 0x433000
Capabilities:
Encode data using xor
Packed with generic packer

Disassembly:
pushal
nop
nop
nop
nop
nop
nop
mov eax, section..rsrc
nop
nop
nop
nop
push 4
nop
nop
pop edi
nop
nop
nop
cmp eax, 0
nop
nop
nop
je 0x433072
nop
nop
nop
nop
mov ebx, 0x40de38
nop
nop
nop
nop
mov ecx, ebx
nop
nop
sub ecx, eax
nop
nop
nop
nop
nop
xor edx, edx
nop
nop
nop
nop
nop
nop
push eax
nop
mov eax, ecx
nop
nop
nop
nop
nop
nop
nop
nop
div edi
nop
nop
nop
nop
xchg ecx, eax
nop
nop
nop
nop
nop
pop eax
nop
mov esi, 0x656a031e
nop
nop
nop
xor dword [eax], esi
nop
nop
nop
nop
nop
nop
add eax, edi
nop
nop
loop 0x433060
nop
nop
mov eax, section..data
nop
nop
cmp eax, 0
nop
nop
nop
nop
nop
nop
je 0x4330d2
nop
mov ebx, 0x4304d8
nop
mov ecx, ebx
nop
nop
nop
nop
nop
nop
nop
sub ecx, eax
nop
nop
xor edx, edx
nop
nop
nop
nop
push eax
nop
nop
nop
nop
mov eax, ecx
nop
nop
nop
nop
div edi
nop
nop
nop
nop
xchg ecx, eax
nop
nop
nop
nop
nop
pop eax
nop
nop
nop
nop
mov esi, 0xca72cd2
nop
nop
nop
xor dword [eax], esi
nop
nop
nop
nop
nop
nop
add eax, edi
nop
nop
nop
nop
loop 0x4330c0
nop
nop
nop
popal
nop
nop
jmp 0x431219
Function at 0x40615b
Capabilities:
Create pipe
Get common file path

Disassembly:
push ebp
mov ebp, esp
mov eax, dword [0x4f2c58]
mov ecx, dword [0x4f1bac]
sub esp, 0xe84
push ebx
push esi
shr eax, 3
xor esi, esi
push edi
cmp eax, esi
jbe 0x40625e
mov ebx, ecx
mov dword [ebp - 8], eax
cmp dword [0x4f2c58], 0x959
jne 0x40624c
lea eax, [ebp - 0x18]
push eax
push esi
lea eax, [ebp - 0x2c]
push eax
push esi
call dword [sym.imp.KERNEL32.dll_PeekConsoleInputA]
xor eax, eax
mov word [ebp - 4], ax
lea edi, [ebp - 2]
stosw word es:[edi], ax
lea eax, [ebp - 0x14]
push eax
push dword [ebp - 4]
push esi
push esi
push esi
call dword [sym.imp.KERNEL32.dll_FillConsoleOutputCharacterA]
push esi
push esi
lea eax, [ebp - 0x680]
push eax
call dword [sym.imp.KERNEL32.dll_GetConsoleAliasesA]
push esi
push esi
push esi
push esi
push esi
push esi
push esi
push esi
call dword [sym.imp.KERNEL32.dll_CreateNamedPipeW]
push esi
call dword [sym.imp.KERNEL32.dll_GetPriorityClass]
push esi
push esi
push esi
call dword [sym.imp.KERNEL32.dll_SetConsoleWindowInfo]
push esi
call dword [sym.imp.KERNEL32.dll_FreeEnvironmentStringsA]
lea eax, [ebp - 0x280]
push eax
push esi
call dword [sym.imp.KERNEL32.dll_FindFirstFileW]
push 0x405920
push esi
push esi
call dword [sym.imp.KERNEL32.dll_OpenWaitableTimerW]
push esi
push esi
push esi
push esi
push esi
push esi
push 0x405978
call dword [sym.imp.KERNEL32.dll_CreateFileA]
push esi
lea eax, [ebp - 0xe80]
push eax
call dword [sym.imp.KERNEL32.dll_GetWindowsDirectoryW]
push esi
push esi
call dword [sym.imp.KERNEL32.dll_GetExitCodeProcess]
lea eax, [ebp - 0x10]
push eax
mov dword [ebp - 0x10], esi
mov dword [ebp - 0xc], esi
call dword [sym.imp.KERNEL32.dll_InterlockedFlushSList]
push esi
call dword [sym.imp.KERNEL32.dll_GetModuleHandleW]
push ebx
call fcn.00405f68
add ebx, 8
dec dword [ebp - 8]
jne 0x406184
pop edi
pop esi
pop ebx
leave
ret
Function at 0x40886b
Capabilities:
Terminate process

Disassembly:
cmp ecx, dword [0x441718]
jne 0x408875
repz ret
jmp fcn.0041010c

Function at 0x411e87
Capabilities:
Link many functions at runtime

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x14
push ebx
push esi
push edi
call fcn.00409fed
and dword [ebp - 4], 0
cmp dword [0x4437a0], 0
mov ebx, eax
jne 0x411f38
push 0x40392c
call dword [sym.imp.KERNEL32.dll_LoadLibraryA]
mov edi, eax
test edi, edi
je 0x411fe9
mov esi, dword [sym.imp.KERNEL32.dll_GetProcAddress]
push 0x403920
push edi
call esi
test eax, eax
je 0x411fe9
push eax
call fcn.00409f7b
mov dword [esp], 0x403910
push edi
mov dword [0x4437a0], eax
call esi
push eax
call fcn.00409f7b
mov dword [esp], 0x4038fc
push edi
mov dword [0x4437a4], eax
call esi
push eax
call fcn.00409f7b
mov dword [esp], 0x4038e0
push edi
mov dword [0x4437a8], eax
call esi
push eax
call fcn.00409f7b
pop ecx
mov dword [0x4437b0], eax
test eax, eax
je 0x411f38
push 0x4038c8
push edi
call esi
push eax
call fcn.00409f7b
pop ecx
mov dword [0x4437ac], eax
mov eax, dword [0x4437ac]
cmp eax, ebx
je 0x411f90
cmp dword [0x4437b0], ebx
je 0x411f90
push eax
call fcn.00409ff6
push dword [0x4437b0]
mov esi, eax
call fcn.00409ff6
pop ecx
pop ecx
mov edi, eax
test esi, esi
je 0x411f90
test edi, edi
je 0x411f90
call esi
test eax, eax
je 0x411f87
lea ecx, [ebp - 8]
push ecx
push 0xc
lea ecx, [ebp - 0x14]
push ecx
push 1
push eax
call edi
test eax, eax
je 0x411f87
test byte [ebp - 0xc], 1
jne 0x411f90
or dword [ebp + 0x10], 0x200000
jmp 0x411fc9
mov eax, dword [0x4437a4]
cmp eax, ebx
je 0x411fc9
push eax
call fcn.00409ff6
pop ecx
test eax, eax
je 0x411fc9
call eax
mov dword [ebp - 4], eax
test eax, eax
je 0x411fc9
mov eax, dword [0x4437a8]
cmp eax, ebx
je 0x411fc9
push eax
call fcn.00409ff6
pop ecx
test eax, eax
je 0x411fc9
push dword [ebp - 4]
call eax
mov dword [ebp - 4], eax
push dword [0x4437a0]
call fcn.00409ff6
pop ecx
test eax, eax
je 0x411fe9
push dword [ebp + 0x10]
push dword [ebp + 0xc]
push dword [ebp + 8]
push dword [ebp - 4]
call eax
jmp 0x411feb
xor eax, eax
pop edi
pop esi
pop ebx
leave
ret
Function at 0x42a509
Capabilities:
Terminate process

Disassembly:
jmp 0x45c841
push 0x17
call dword [sym.imp.KERNEL32.dll_IsProcessorFeaturePresent]
test eax, eax
je 0x45c852
push 5
pop ecx
int 0x29
push esi
push 1
mov esi, 0xc0000417
push esi
push 2
call fcn.0042b927
add esp, 0xc
push esi
call dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
push eax
call dword [sym.imp.KERNEL32.dll_TerminateProcess]
pop esi
ret

Function at 0x42a59f
Capabilities:
Query environment variable

Disassembly:
jmp 0x45fc8a
mov edi, edi
push esi
push edi
call dword [sym.imp.KERNEL32.dll_GetEnvironmentStringsW]
mov esi, eax
test esi, esi
jne 0x45fc9e
xor edi, edi
jmp 0x45fcd5
push ebx
push esi
call fcn.0045fb94
mov ebx, eax
sub ebx, esi
and ebx, 0xfffffffe
push ebx
call fcn.0042aad1
mov edi, eax
pop ecx
pop ecx
test edi, edi
je 0x45fcc5
push ebx
push esi
push edi
call fcn.0042b7c9
add esp, 0xc
push 0
call fcn.0042be22
pop ecx
push esi
call dword [sym.imp.KERNEL32.dll_FreeEnvironmentStringsW]
pop ebx
mov eax, edi
pop edi
pop esi
ret

Function at 0x42b850
Capabilities:
Parse pe header

Disassembly:
jmp 0x430f18
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleHandleW]
test eax, eax
je 0x430f58
mov ecx, 0x5a4d
cmp word [eax], cx
jne 0x430f58
mov ecx, dword [eax + 0x3c]
add ecx, eax
cmp dword [ecx], 0x4550
jne 0x430f58
mov eax, 0x10b
cmp word [ecx + 0x18], ax
jne 0x430f58
cmp dword [ecx + 0x74], 0xe
jbe 0x430f58
cmp dword [ecx + 0xe8], 0
je 0x430f58
mov al, 1
ret
xor al, al
ret
Function at 0xb0b0b0
Capabilities:
Decompress data using aplib

Disassembly:
call fcn.00b0b200
push ebx
mov ebx, esp
push ebx
mov esi, dword [ebx + 8]
mov edi, dword [ebx + 0x10]
cld
mov dl, 0x80
mov al, byte [esi]
inc esi
mov byte [edi], al
inc edi
mov ebx, 2
add dl, dl
jne 0xb0b0d6
mov dl, byte [esi]
inc esi
adc dl, dl
jae 0xb0b0c2
add dl, dl
jne 0xb0b0e1
mov dl, byte [esi]
inc esi
adc dl, dl
jae 0xb0b134
xor eax, eax
add dl, dl
jne 0xb0b0ee
mov dl, byte [esi]
inc esi
adc dl, dl
jae 0xb0b1d5
add dl, dl
jne 0xb0b0fd
mov dl, byte [esi]
inc esi
adc dl, dl
adc eax, eax
add dl, dl
jne 0xb0b108
mov dl, byte [esi]
inc esi
adc dl, dl
adc eax, eax
add dl, dl
jne 0xb0b113
mov dl, byte [esi]
inc esi
adc dl, dl
adc eax, eax
add dl, dl
jne 0xb0b11e
mov dl, byte [esi]
inc esi
adc dl, dl
adc eax, eax
je 0xb0b12a
push edi
mov eax, eax
sub edi, eax
mov al, byte [edi]
pop edi
mov byte [edi], al
inc edi
mov ebx, 2
jmp 0xb0b0cd
mov eax, 1
add dl, dl
jne 0xb0b142
mov dl, byte [esi]
inc esi
adc dl, dl
adc eax, eax
add dl, dl
jne 0xb0b14d
mov dl, byte [esi]
inc esi
adc dl, dl
jb 0xb0b139
sub eax, ebx
mov ebx, 1
jne 0xb0b180
mov ecx, 1
add dl, dl
jne 0xb0b166
mov dl, byte [esi]
inc esi
adc dl, dl
adc ecx, ecx
add dl, dl
jne 0xb0b171
mov dl, byte [esi]
inc esi
adc dl, dl
jb 0xb0b15d
push esi
mov esi, edi
sub esi, ebp
rep movsb byte es:[edi], byte [esi]
pop esi
jmp 0xb0b0cd
dec eax
shl eax, 8
mov al, byte [esi]
inc esi
mov ebp, eax
mov ecx, 1
add dl, dl
jne 0xb0b197
mov dl, byte [esi]
inc esi
adc dl, dl
adc ecx, ecx
add dl, dl
jne 0xb0b1a2
mov dl, byte [esi]
inc esi
adc dl, dl
jb 0xb0b18e
cmp eax, 0x7d00
jae 0xb0b1c5
cmp eax, 0x500
jb 0xb0b1c0
inc ecx
push esi
mov esi, edi
sub esi, eax
rep movsb byte es:[edi], byte [esi]
pop esi
jmp 0xb0b0cd
cmp eax, 0x7f
ja 0xb0b1c8
add ecx, 2
push esi
mov esi, edi
sub esi, eax
rep movsb byte es:[edi], byte [esi]
pop esi
jmp 0xb0b0cd
mov al, byte [esi]
inc esi
xor ecx, ecx
shr al, 1
je 0xb0b1f6
adc ecx, 2
mov ebp, eax
push esi
mov esi, edi
sub esi, eax
rep movsb byte es:[edi], byte [esi]
pop esi
mov ebx, 1
jmp 0xb0b0cd
pop ebx
sub edi, dword [ebx + 0x10]
mov eax, edi
pop ebx
ret 0x10
Function at 0x403164
Capabilities:
Accept command line arguments

Disassembly:
push ebx
push esi
push edi
add esp, 0xfffffef8
mov ebx, edx
mov esi, eax
mov eax, ebx
call fcn.00404e7c
test esi, esi
jne 0x40319a
push 0x105
lea eax, [esp + 4]
push eax
push 0
call sub.kernel32.dll_GetModuleFileNameA
mov ecx, eax
mov edx, esp
mov eax, ebx
call fcn.00404f6c
jmp 0x4031b8
call sub.kernel32.dll_GetCommandLineA
mov edi, eax
mov edx, ebx
mov eax, edi
call fcn.00403068
mov edi, eax
test esi, esi
je 0x4031b8
cmp dword [ebx], 0
je 0x4031b8
dec esi
jmp 0x4031a1
add esp, 0x108
pop edi
pop esi
pop ebx
ret

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

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

Function at 0x403df4
Capabilities:
Query or enumerate registry value

Disassembly:
push ebp
mov ebp, esp
add esp, 0xfffffff4
movzx eax, word [0x492024]
mov dword [ebp - 8], eax
lea eax, [ebp - 4]
push eax
push 1
push 0
push 0x403e8c
push 0x80000002
call sub.advapi32.dll_RegOpenKeyExA
test eax, eax
jne 0x403e6c
xor eax, eax
push ebp
push 0x403e65
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 0x403ea8
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 0x403e6c
mov eax, dword [ebp - 4]
push eax
call sub.advapi32.dll_RegCloseKey
ret
movzx eax, word [0x492024]
and ax, 0xffc0
movzx edx, word [ebp - 8]
and dx, 0x3f
or ax, dx
mov word [0x492024], ax
mov esp, ebp
pop ebp
ret

Function at 0x404cfc
Capabilities:
Write file on windows

Disassembly:
push ecx
cmp byte [0x67604c], 0
je 0x404d5d
cmp word [0x676220], 0xd7b2
jne 0x404d25
cmp dword [0x676228], 0
jbe 0x404d25
mov eax, 0x67621c
call dword [0x676238]
push 0
lea eax, [esp + 4]
push eax
push 0x1e
push str.Runtime_error_____at_00000000
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 0x404d84
push 0xfffffffffffffff5
call sub.kernel32.dll_GetStdHandle
push eax
call sub.kernel32.dll_WriteFile
pop edx
ret
cmp byte [0x492030], 0
jne 0x404d79
push 0
push str.Error
push str.Runtime_error_____at_00000000
push 0
call sub.user32.dll_MessageBoxA
pop edx
ret
Function at 0x408e3c
Capabilities:
Encode data using xor

Disassembly:
push ebx
push esi
push edi
mov esi, eax
mov eax, edx
test esi, esi
je 0x408ecc
mov edx, dword [esi - 4]
mov edi, eax
test edx, edx
jle 0x408ecc
mov ecx, dword [eax]
mov ebx, edx
test ecx, ecx
je 0x408e7f
test edx, 3
jne 0x408e6e
xor edx, dword [ecx - 4]
cmp edx, 3
jbe 0x408e79
jmp 0x408e7f
or edx, 2
xor edx, dword [ecx - 4]
cmp edx, 1
ja 0x408e7f
cmp dword [ecx - 8], 1
je 0x408e89
mov edx, ebx
or edx, 3
call fcn.004055c8
mov edi, dword [edi]
mov dword [edi - 4], ebx
mov byte [edi + ebx], 0
add ebx, 0xffffffff
and ebx, 0xfffffffc
mov eax, dword [esi + ebx]
mov ecx, eax
or eax, 0x80808080
mov edx, eax
sub eax, 0x7b7b7b7b
xor edx, ecx
or eax, 0x80808080
sub eax, 0x66666666
and eax, edx
shr eax, 2
xor eax, ecx
mov dword [edi + ebx], eax
mov eax, dword [esi + ebx - 4]
sub ebx, 4
jge 0x408e9b
pop edi
pop esi
pop ebx
ret
pop edi
pop esi
pop ebx
jmp fcn.00404e7c

Function at 0x408ed8
Capabilities:
Encode data using xor

Disassembly:
push ebx
push esi
push edi
mov esi, eax
mov eax, edx
test esi, esi
je 0x408f68
mov edx, dword [esi - 4]
mov edi, eax
test edx, edx
jle 0x408f68
mov ecx, dword [eax]
mov ebx, edx
test ecx, ecx
je 0x408f1b
test edx, 3
jne 0x408f0a
xor edx, dword [ecx - 4]
cmp edx, 3
jbe 0x408f15
jmp 0x408f1b
or edx, 2
xor edx, dword [ecx - 4]
cmp edx, 1
ja 0x408f1b
cmp dword [ecx - 8], 1
je 0x408f25
mov edx, ebx
or edx, 3
call fcn.004055c8
mov edi, dword [edi]
mov dword [edi - 4], ebx
mov byte [edi + ebx], 0
add ebx, 0xffffffff
and ebx, 0xfffffffc
mov eax, dword [esi + ebx]
mov ecx, eax
or eax, 0x80808080
mov edx, eax
sub eax, 0x5b5b5b5b
xor edx, ecx
or eax, 0x80808080
sub eax, 0x66666666
and eax, edx
shr eax, 2
xor eax, ecx
mov dword [edi + ebx], eax
mov eax, dword [esi + ebx - 4]
sub ebx, 4
jge 0x408f37
pop edi
pop esi
pop ebx
ret
pop edi
pop esi
pop ebx
jmp fcn.00404e7c

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

Disassembly:
push ebx
mov ebx, eax
mov eax, ebx
call fcn.00405340
push eax
call sub.kernel32.dll_GetFileAttributesA
cmp eax, 0xffffffff
je 0x409901
test al, 0x10
je 0x409905
xor eax, eax
pop ebx
ret
mov al, 1
pop ebx
ret

Function at 0x40c424
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 0x40c45d
mov ecx, eax
dec ecx
lea edx, [ebp - 0x100]
mov eax, ebx
call fcn.00404f6c
jmp 0x40c466
mov eax, ebx
mov edx, esi
call fcn.00404ed0
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 4

Function at 0x40c470
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 0x40c492
movzx eax, byte [esp]
jmp 0x40c494
mov eax, ebx
pop edx
pop edi
pop esi
pop ebx
ret