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

Disassembly:
sub esp, 0xd0
push ebx
push ebp
mov ebp, dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
push esi
push edi
mov ebx, 0x41207c
jmp 0x4027f0
mov ecx, 0xa
mov esi, str.SoftwareSybaseAdaptive_Server_Anywhere
lea edi, [esp + 0x18]
rep movsd dword es:[edi], dword [esi]
movsb byte es:[edi], byte [esi]
lea edi, [esp + 0x18]
dec edi
mov al, byte [edi + 1]
inc edi
test al, al
jne 0x402806
mov ax, word [0x40e3d8]
mov word [edi], ax
mov eax, dword [esp + 0xe4]
mov edx, eax
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x402820
lea edi, [esp + 0x18]
sub eax, edx
dec edi
mov edi, edi
mov cl, byte [edi + 1]
inc edi
test cl, cl
jne 0x402830
mov ecx, eax
shr ecx, 2
mov esi, edx
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
mov eax, dword [ebx]
and ecx, 3
rep movsb byte es:[edi], byte [esi]
lea ecx, [esp + 0x10]
push ecx
push 0x20019
push 0
lea edx, [esp + 0x24]
push edx
push eax
call ebp
test eax, eax
jne 0x4028aa
mov edx, dword [esp + 0xec]
lea ecx, [esp + 0xf0]
push ecx
mov ecx, dword [esp + 0xec]
push edx
mov edx, dword [esp + 0x18]
lea eax, [esp + 0x1c]
push eax
push 0
push ecx
push edx
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
mov esi, eax
mov eax, dword [esp + 0x10]
push eax
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
test esi, esi
jne 0x4028aa
mov ecx, dword [esp + 0xf4]
cmp dword [esp + 0x14], ecx
je 0x4028c6
add ebx, 4
cmp ebx, 0x412084
jl 0x4027f0
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0xd0
ret
pop edi
pop esi
pop ebp
mov eax, 1
pop ebx
add esp, 0xd0
ret

Function at 0x402af0
Capabilities:
Query environment variable

Disassembly:
mov eax, dword [esp + 0xc]
mov ecx, dword [esp + 4]
push esi
mov esi, dword [esp + 0xc]
push eax
push esi
push ecx
call dword [sym.imp.KERNEL32.dll_GetEnvironmentVariableA]
test eax, eax
je 0x402b0e
mov eax, esi
pop esi
ret
mov byte [esi], 0
xor eax, eax
pop esi
ret

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

Disassembly:
push dword [esp + 4]
call dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
cmp eax, 0xffffffff
jne 0x4041b4
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
call fcn.00404e04
pop ecx
or eax, 0xffffffff
ret
test al, 1
je 0x4041d7
test byte [esp + 8], 2
je 0x4041d7
call fcn.00404df2
mov dword [eax], 0xd
call fcn.00404dfb
mov dword [eax], 5
jmp 0x4041b0
xor eax, eax
ret
Function at 0x4049d5
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xc
and dword [ebp - 8], 0
cmp dword [ebp + 0x10], 0
push ebx
mov ebx, dword [ebp + 0xc]
push esi
push edi
mov edx, ebx
je 0x404b9b
mov eax, dword [ebp + 8]
mov ecx, eax
and eax, 0x1f
sar ecx, 5
lea esi, [eax + eax*8]
lea edi, [ecx*4 + 0x414ec0]
mov eax, dword [edi]
shl esi, 2
add eax, esi
mov cl, byte [eax + 4]
test cl, 2
jne 0x404b9b
test cl, 0x48
je 0x404a3b
mov al, byte [eax + 5]
cmp al, 0xa
je 0x404a3b
dec dword [ebp + 0x10]
mov byte [ebx], al
mov eax, dword [edi]
lea edx, [ebx + 1]
mov dword [ebp - 8], 1
mov byte [eax + esi + 5], 0xa
push 0
lea eax, [ebp - 0xc]
push eax
push dword [ebp + 0x10]
mov eax, dword [edi]
push edx
push dword [eax + esi]
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
jne 0x404a8d
call dword [sym.imp.KERNEL32.dll_GetLastError]
push 5
pop esi
cmp eax, esi
jne 0x404a75
call fcn.00404df2
mov dword [eax], 9
call fcn.00404dfb
mov dword [eax], esi
jmp 0x404a85
cmp eax, 0x6d
je 0x404b9b
push eax
call fcn.00404e04
pop ecx
or eax, 0xffffffff
jmp 0x404b9d
mov eax, dword [edi]
mov edx, dword [ebp - 0xc]
add dword [ebp - 8], edx
lea ecx, [eax + esi + 4]
mov al, byte [ecx]
test al, al
jns 0x404b96
test edx, edx
je 0x404ab0
cmp byte [ebx], 0xa
jne 0x404ab0
or al, 4
jmp 0x404ab2
and al, 0xfb
mov byte [ecx], al
mov eax, dword [ebp + 0xc]
mov ecx, dword [ebp - 8]
add ecx, eax
cmp eax, ecx
mov dword [ebp + 0x10], eax
mov dword [ebp - 8], ecx
jae 0x404b90
mov eax, dword [ebp + 0x10]
mov al, byte [eax]
cmp al, 0x1a
je 0x404b80
cmp al, 0xd
je 0x404ae6
mov byte [ebx], al
inc ebx
inc dword [ebp + 0x10]
jmp 0x404b72
dec ecx
cmp dword [ebp + 0x10], ecx
jae 0x404b00
mov eax, dword [ebp + 0x10]
inc eax
cmp byte [eax], 0xa
jne 0x404afb
add dword [ebp + 0x10], 2
jmp 0x404b54
mov dword [ebp + 0x10], eax
jmp 0x404b6e
inc dword [ebp + 0x10]
push 0
lea eax, [ebp - 0xc]
push eax
push 1
lea eax, [ebp - 1]
push eax
mov eax, dword [edi]
push dword [eax + esi]
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
jne 0x404b28
call dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
jne 0x404b6e
cmp dword [ebp - 0xc], 0
je 0x404b6e
mov eax, dword [edi]
test byte [eax + esi + 4], 0x48
je 0x404b49
mov al, byte [ebp - 1]
cmp al, 0xa
je 0x404b54
mov byte [ebx], 0xd
mov ecx, dword [edi]
mov byte [ecx + esi + 5], al
jmp 0x404b71
cmp ebx, dword [ebp + 0xc]
jne 0x404b59
cmp byte [ebp - 1], 0xa
jne 0x404b59
mov byte [ebx], 0xa
jmp 0x404b71
push 1
push 0xffffffffffffffff
push dword [ebp + 8]
call fcn.00409a22
add esp, 0xc
cmp byte [ebp - 1], 0xa
je 0x404b72
mov byte [ebx], 0xd
inc ebx
mov ecx, dword [ebp - 8]
cmp dword [ebp + 0x10], ecx
jb 0x404aca
jmp 0x404b90
mov eax, dword [edi]
lea esi, [eax + esi + 4]
mov al, byte [esi]
test al, 0x40
jne 0x404b90
or al, 2
mov byte [esi], al
sub ebx, dword [ebp + 0xc]
mov dword [ebp - 8], ebx
mov eax, dword [ebp - 8]
jmp 0x404b9d
xor eax, eax
pop edi
pop esi
pop ebx
leave
ret
Function at 0x404ba2
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x420
mov eax, dword [0x413d40]
xor eax, dword [ebp + 4]
push edi
xor edi, edi
cmp dword [ebp + 0x10], edi
mov dword [ebp - 4], eax
mov dword [ebp - 0x14], edi
mov dword [ebp - 0x18], edi
jne 0x404bcb
xor eax, eax
jmp 0x404d39
mov eax, dword [ebp + 8]
push ebx
mov ebx, dword [ebp + 8]
and eax, 0x1f
sar ebx, 5
push esi
lea esi, [eax + eax*8]
lea ebx, [ebx*4 + 0x414ec0]
mov eax, dword [ebx]
shl esi, 2
test byte [eax + esi + 4], 0x20
je 0x404bfe
push 2
push edi
push edi
push dword [ebp + 8]
call fcn.004042f8
add esp, 0x10
mov eax, dword [ebx]
add eax, esi
test byte [eax + 4], 0x80
je 0x404cd0
cmp dword [ebp + 0x10], edi
mov eax, dword [ebp + 0xc]
mov dword [ebp - 0x10], eax
mov dword [ebp - 8], edi
jbe 0x404d0b
mov ecx, dword [ebp - 0x10]
sub ecx, dword [ebp + 0xc]
lea eax, [ebp - 0x420]
mov dword [ebp - 0xc], edi
cmp ecx, dword [ebp + 0x10]
jae 0x404c59
mov edx, dword [ebp - 0x10]
inc dword [ebp - 0x10]
mov dl, byte [edx]
inc ecx
cmp dl, 0xa
jne 0x404c4a
inc dword [ebp - 0x18]
mov byte [eax], 0xd
inc eax
inc dword [ebp - 0xc]
mov byte [eax], dl
inc eax
inc dword [ebp - 0xc]
cmp dword [ebp - 0xc], 0x400
jl 0x404c2d
mov edi, eax
lea eax, [ebp - 0x420]
sub edi, eax
push 0
lea eax, [ebp - 0x1c]
push eax
push edi
lea eax, [ebp - 0x420]
push eax
mov eax, dword [ebx]
push dword [eax + esi]
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x404c99
mov eax, dword [ebp - 0x1c]
add dword [ebp - 0x14], eax
cmp eax, edi
jl 0x404ca2
mov eax, dword [ebp - 0x10]
sub eax, dword [ebp + 0xc]
xor edi, edi
cmp eax, dword [ebp + 0x10]
jb 0x404c1e
jmp 0x404ca4
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp - 8], eax
xor edi, edi
mov eax, dword [ebp - 0x14]
cmp eax, edi
jne 0x404d34
cmp dword [ebp - 8], edi
je 0x404d0b
push 5
pop esi
cmp dword [ebp - 8], esi
jne 0x404cfd
call fcn.00404df2
mov dword [eax], 9
call fcn.00404dfb
mov dword [eax], esi
jmp 0x404d06
push edi
lea ecx, [ebp - 0x1c]
push ecx
push dword [ebp + 0x10]
push dword [ebp + 0xc]
push dword [eax]
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x404cf2
mov eax, dword [ebp - 0x1c]
mov dword [ebp - 8], edi
mov dword [ebp - 0x14], eax
jmp 0x404ca4
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp - 8], eax
jmp 0x404ca4
push dword [ebp - 8]
call fcn.00404e04
pop ecx
or eax, 0xffffffff
jmp 0x404d37
mov eax, dword [ebx]
test byte [eax + esi + 4], 0x40
je 0x404d20
mov eax, dword [ebp + 0xc]
cmp byte [eax], 0x1a
jne 0x404d20
xor eax, eax
jmp 0x404d37
call fcn.00404df2
mov dword [eax], 0x1c
call fcn.00404dfb
mov dword [eax], edi
jmp 0x404d06
sub eax, dword [ebp - 0x18]
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, dword [ebp + 4]
pop edi
call fcn.00408e36
leave
ret
Function at 0x4098e7
Capabilities:
Clear file content

Disassembly:
push ebp
mov ebp, esp
mov eax, 0x100c
call fcn.00404fc0
mov eax, dword [0x413d40]
xor eax, dword [ebp + 4]
push ebx
push esi
push 1
xor esi, esi
push esi
push dword [ebp + 8]
mov dword [ebp - 4], eax
call fcn.00409a22
or ebx, 0xffffffff
add esp, 0xc
cmp eax, ebx
mov dword [ebp - 8], eax
je 0x409a11
push 2
push esi
push dword [ebp + 8]
call fcn.00409a22
add esp, 0xc
cmp eax, ebx
je 0x409a11
push edi
mov edi, dword [ebp + 0xc]
sub edi, eax
test edi, edi
jle 0x4099b4
mov ebx, 0x1000
push ebx
lea eax, [ebp - 0x100c]
push esi
push eax
call fcn.0040b080
push 0x8000
push dword [ebp + 8]
call fcn.0040c108
add esp, 0x14
mov dword [ebp - 0xc], eax
cmp edi, ebx
mov eax, ebx
jge 0x40996d
mov eax, edi
push eax
lea eax, [ebp - 0x100c]
push eax
push dword [ebp + 8]
call fcn.00404ba2
add esp, 0xc
cmp eax, 0xffffffff
je 0x40998d
sub edi, eax
test edi, edi
jg 0x409965
jmp 0x4099a5
call fcn.00404dfb
cmp dword [eax], 5
jne 0x4099a2
call fcn.00404df2
mov dword [eax], 0xd
or esi, 0xffffffff
push dword [ebp - 0xc]
push dword [ebp + 8]
call fcn.0040c108
pop ecx
pop ecx
jmp 0x4099fc
jge 0x4099fc
push 0
push dword [ebp + 0xc]
push dword [ebp + 8]
call fcn.00409a22
push dword [ebp + 8]
call fcn.004047b2
add esp, 0x10
push eax
call dword [sym.imp.KERNEL32.dll_SetEndOfFile]
mov esi, eax
neg esi
sbb esi, esi
neg esi
dec esi
cmp esi, ebx
jne 0x4099fc
call fcn.00404df2
mov dword [eax], 0xd
call fcn.00404dfb
mov edi, eax
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [edi], eax
push 0
push dword [ebp - 8]
push dword [ebp + 8]
call fcn.00409a22
add esp, 0xc
mov eax, esi
pop edi
jmp 0x409a13
mov eax, ebx
mov ecx, dword [ebp - 4]
xor ecx, dword [ebp + 4]
pop esi
pop ebx
call fcn.00408e36
leave
ret
Function at 0x40b3a0
Capabilities:
Link many functions at runtime

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x10
push ebx
xor ebx, ebx
cmp dword [0x414b3c], ebx
push esi
push edi
jne 0x40b420
push str.user32.dll
call dword [sym.imp.KERNEL32.dll_LoadLibraryA]
mov edi, eax
cmp edi, ebx
je 0x40b45b
mov esi, dword [sym.imp.KERNEL32.dll_GetProcAddress]
push str.MessageBoxA
push edi
call esi
test eax, eax
mov dword [0x414b3c], eax
je 0x40b45b
push str.GetActiveWindow
push edi
call esi
push str.GetLastActivePopup
push edi
mov dword [0x414b40], eax
call esi
cmp dword [0x4147cc], 2
mov dword [0x414b44], eax
jne 0x40b420
push str.GetUserObjectInformationA
push edi
call esi
test eax, eax
mov dword [0x414b4c], eax
je 0x40b420
push str.GetProcessWindowStation
push edi
call esi
mov dword [0x414b48], eax
mov eax, dword [0x414b48]
test eax, eax
je 0x40b465
call eax
test eax, eax
je 0x40b44c
lea ecx, [ebp - 4]
push ecx
push 0xc
lea ecx, [ebp - 0x10]
push ecx
push 1
push eax
call dword [0x414b4c]
test eax, eax
je 0x40b44c
test byte [ebp - 8], 1
jne 0x40b465
cmp dword [0x4147d8], 4
jb 0x40b45f
or byte [ebp + 0x12], 0x20
jmp 0x40b484
xor eax, eax
jmp 0x40b494
or byte [ebp + 0x12], 4
jmp 0x40b484
mov eax, dword [0x414b40]
test eax, eax
je 0x40b484
call eax
mov ebx, eax
test ebx, ebx
je 0x40b484
mov eax, dword [0x414b44]
test eax, eax
je 0x40b484
push ebx
call eax
mov ebx, eax
push dword [ebp + 0x10]
push dword [ebp + 0xc]
push dword [ebp + 8]
push ebx
call dword [0x414b3c]
pop edi
pop esi
pop ebx
leave
ret

Function at 0x40b4d0
Capabilities:
Get common file path

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x10c
mov eax, dword [0x413d40]
xor eax, dword [ebp + 4]
push ebx
mov ebx, dword [ebp + 8]
test ebx, ebx
mov dword [ebp - 4], eax
je 0x40b54b
push ebx
call fcn.0040b499
test eax, eax
pop ecx
jne 0x40b51d
call fcn.00404dfb
mov dword [eax], 0xf
call fcn.00404df2
mov dword [eax], 0xd
xor eax, eax
mov ecx, dword [ebp - 4]
xor ecx, dword [ebp + 4]
pop ebx
call fcn.00408e36
leave
ret
and byte [ebp + 0xb], 0
lea eax, [ebp - 8]
push eax
lea eax, [ebp - 0x10c]
push eax
push 0x104
lea eax, [ebp + 8]
add bl, 0x40
push eax
mov byte [ebp + 8], bl
mov byte [ebp + 9], 0x3a
mov byte [ebp + 0xa], 0x2e
call dword [sym.imp.KERNEL32.dll_GetFullPathNameA]
jmp 0x40b55d
lea eax, [ebp - 0x10c]
push eax
push 0x104
call dword [sym.imp.KERNEL32.dll_GetCurrentDirectoryA]
test eax, eax
je 0x40b50d
inc eax
cmp eax, 0x104
ja 0x40b50d
mov ecx, dword [ebp + 0xc]
test ecx, ecx
jne 0x40b595
cmp eax, dword [ebp + 0x10]
jg 0x40b578
mov eax, dword [ebp + 0x10]
push eax
call fcn.00403989
pop ecx
mov ecx, eax
test ecx, ecx
jne 0x40b5aa
call fcn.00404df2
mov dword [eax], 0xc
jmp 0x40b50d
cmp eax, dword [ebp + 0x10]
jle 0x40b5aa
call fcn.00404df2
mov dword [eax], 0x22
jmp 0x40b50d
lea eax, [ebp - 0x10c]
push eax
push ecx
call fcn.00408bd0
pop ecx
pop ecx
jmp 0x40b50f
Function at 0x40b9bc
Capabilities:
Get system information on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x48
push ebx
push esi
push edi
push 4
pop eax
call fcn.00404fc0
mov ebx, esp
push 0x1c
lea eax, [ebp - 0x24]
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_VirtualQuery]
test eax, eax
je 0x40ba51
mov edi, dword [ebp - 0x20]
lea eax, [ebp - 0x48]
push eax
call dword [sym.imp.KERNEL32.dll_GetSystemInfo]
mov eax, dword [ebp - 0x44]
lea esi, [eax - 1]
not esi
and esi, ebx
sub esi, eax
mov dword [ebp - 4], eax
mov eax, dword [0x4147cc]
mov ecx, eax
dec ecx
neg ecx
sbb ecx, ecx
and ecx, 0xffff1000
add ecx, 0x11000
add ecx, edi
cmp esi, ecx
jb 0x40ba51
cmp eax, 1
je 0x40ba69
mov ebx, edi
mov edi, 0x1000
push 0x1c
lea eax, [ebp - 0x24]
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_VirtualQuery]
test eax, eax
je 0x40ba51
add ebx, dword [ebp - 0x18]
test dword [ebp - 0x14], edi
je 0x40ba26
test byte [ebp - 0xf], 1
mov ebx, dword [ebp - 0x24]
je 0x40ba4d
xor eax, eax
inc eax
jmp 0x40ba85
cmp esi, ebx
jae 0x40ba55
xor eax, eax
jmp 0x40ba85
push 4
push edi
push dword [ebp - 4]
push ebx
call dword [sym.imp.KERNEL32.dll_VirtualAlloc]
mov eax, dword [0x4147cc]
jmp 0x40ba6b
mov ebx, esi
dec eax
neg eax
sbb eax, eax
and eax, 0x103
lea ecx, [ebp - 8]
push ecx
inc eax
push eax
push dword [ebp - 4]
push ebx
call dword [sym.imp.KERNEL32.dll_VirtualProtect]
lea esp, [ebp - 0x54]
pop edi
pop esi
pop ebx
leave
ret
Function at 0x40bee1
Capabilities:
Set environment variable

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xc
push ebx
xor ebx, ebx
cmp dword [ebp + 8], ebx
push esi
push edi
mov dword [ebp - 8], ebx
je 0x40bf4c
push 0x3d
push dword [ebp + 8]
call fcn.0040c725
mov esi, eax
cmp esi, ebx
pop ecx
pop ecx
mov dword [ebp - 0xc], esi
je 0x40bf4c
cmp dword [ebp + 8], esi
je 0x40bf4c
xor eax, eax
cmp byte [esi + 1], al
sete al
mov dword [ebp - 4], eax
mov eax, dword [0x4147ec]
cmp eax, dword [0x4147f0]
jne 0x40bf32
mov edi, eax
call fcn.0040be80
mov dword [0x4147ec], eax
cmp eax, ebx
jne 0x40bf8b
cmp dword [ebp + 0xc], ebx
je 0x40bf54
cmp dword [0x4147f4], ebx
je 0x40bf54
call fcn.0040987c
test eax, eax
je 0x40bf8b
or eax, 0xffffffff
pop edi
pop esi
pop ebx
leave
ret
cmp dword [ebp - 4], ebx
jne 0x40c08f
push 4
call fcn.00403989
cmp eax, ebx
pop ecx
mov dword [0x4147ec], eax
je 0x40bf4c
mov dword [eax], ebx
cmp dword [0x4147f4], ebx
jne 0x40bf8b
push 4
call fcn.00403989
cmp eax, ebx
pop ecx
mov dword [0x4147f4], eax
je 0x40bf4c
mov dword [eax], ebx
mov ebx, dword [0x4147ec]
mov edi, esi
mov esi, dword [ebp + 8]
sub edi, esi
push esi
call fcn.0040be33
mov edi, eax
test edi, edi
pop ecx
jl 0x40bfe4
cmp dword [ebx], 0
je 0x40bfe4
lea esi, [ebx + edi*4]
push dword [esi]
call fcn.004039d5
xor eax, eax
cmp dword [ebp - 4], eax
pop ecx
jne 0x40bfcc
mov eax, dword [ebp + 8]
mov dword [esi], eax
jmp 0x40c01a
mov ecx, dword [esi + 4]
mov dword [esi], ecx
inc edi
add esi, 4
cmp dword [esi], eax
jne 0x40bfc3
mov eax, edi
shl eax, 2
push eax
push ebx
call fcn.0040528b
test eax, eax
pop ecx
pop ecx
je 0x40c01a
jmp 0x40c015
cmp dword [ebp - 4], 0
jne 0x40c088
test edi, edi
jge 0x40bff4
neg edi
lea eax, [edi*4 + 8]
push eax
push ebx
call fcn.0040528b
test eax, eax
pop ecx
pop ecx
je 0x40bf4c
lea ecx, [eax + edi*4]
and dword [ecx + 4], 0
mov dword [ecx], esi
mov dword [0x4147ec], eax
cmp dword [ebp + 0xc], 0
je 0x40c071
push dword [ebp + 8]
call fcn.00408cd0
inc eax
inc eax
push eax
call fcn.00403989
mov esi, eax
test esi, esi
pop ecx
pop ecx
je 0x40c071
push dword [ebp + 8]
push esi
call fcn.00408bd0
mov eax, esi
sub eax, dword [ebp + 8]
pop ecx
add eax, dword [ebp - 0xc]
pop ecx
and byte [eax], 0
mov ecx, dword [ebp - 4]
inc eax
neg ecx
sbb ecx, ecx
not ecx
and ecx, eax
push ecx
push esi
call dword [sym.imp.KERNEL32.dll_SetEnvironmentVariableA]
test eax, eax
jne 0x40c06a
or dword [ebp - 8], 0xffffffff
push esi
call fcn.004039d5
pop ecx
cmp dword [ebp - 4], 0
je 0x40c080
push dword [ebp + 8]
call fcn.004039d5
pop ecx
mov eax, dword [ebp - 8]
jmp 0x40bf4f
push esi
call fcn.004039d5
pop ecx
xor eax, eax
jmp 0x40bf4f
Function at 0x402768
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.00403930
test esi, esi
jne 0x40279e
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.00403a20
jmp 0x4027bc
call sub.kernel32.dll_GetCommandLineA
mov edi, eax
mov edx, ebx
mov eax, edi
call fcn.0040267c
mov edi, eax
test esi, esi
je 0x4027bc
cmp dword [ebx], 0
je 0x4027bc
dec esi
jmp 0x4027a5
add esp, 0x108
pop edi
pop esi
pop ebx
ret

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

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

Function at 0x402f10
Capabilities:
Query or enumerate registry value

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

Function at 0x4037b4
Capabilities:
Write file on windows

Disassembly:
push ecx
cmp byte [0x415034], 0
je 0x403815
cmp word [0x415208], 0xd7b2
jne 0x4037dd
cmp dword [0x415210], 0
jbe 0x4037dd
mov eax, 0x415204
call dword [0x415220]
push 0
lea eax, [esp + 4]
push eax
push 0x1e
push 0x40f064
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 0x40383c
push 0xfffffffffffffff5
call sub.kernel32.dll_GetStdHandle
push eax
call sub.kernel32.dll_WriteFile
pop edx
ret
cmp byte [0x40f024], 0
jne 0x403831
push 0
push 0x40f05c
push 0x40f064
push 0
call sub.user32.dll_MessageBoxA
pop edx
ret

Function at 0x4047b0
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 0x404816
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.00403ab8
mov eax, dword [ebp - 0x10]
lea edx, [ebp - 4]
call fcn.00402dd4
mov ebx, eax
cmp dword [ebp - 4], 0
je 0x404800
xor ebx, ebx
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x40481d
lea eax, [ebp - 0x10]
call fcn.00403930
ret
Function at 0x405524
Capabilities:
Create directory

Disassembly:
push ebp
mov ebp, esp
add esp, 0xfffffff8
push ebx
xor edx, edx
mov dword [ebp - 8], edx
mov dword [ebp - 4], eax
mov eax, dword [ebp - 4]
call fcn.00403cc0
xor eax, eax
push ebp
push 0x4055c3
push dword fs:[eax]
mov dword fs:[eax], esp
mov bl, 1
mov eax, dword [ebp - 4]
call fcn.00403ad0
test eax, eax
je 0x4055a8
lea eax, [ebp - 4]
call fcn.004054f0
push 0
mov eax, dword [ebp - 4]
call fcn.00403cd0
push eax
call sub.kernel32.dll_CreateDirectoryA
test eax, eax
je 0x405577
mov bl, 1
jmp 0x4055a8
lea edx, [ebp - 8]
mov eax, dword [ebp - 4]
call fcn.004051cc
mov eax, dword [ebp - 8]
call fcn.00405524
test al, al
je 0x4055a2
push 0
mov eax, dword [ebp - 4]
call fcn.00403cd0
push eax
call sub.kernel32.dll_CreateDirectoryA
test eax, eax
jne 0x4055a6
xor ebx, ebx
jmp 0x4055a8
mov bl, 1
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x4055ca
lea eax, [ebp - 8]
mov edx, 2
call fcn.00403954
ret
Function at 0x4062d0
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
push ecx
push ebx
push esi
push edi
mov edi, edx
mov dword [ebp - 4], eax
mov eax, dword [ebp - 4]
call fcn.00403cc0
xor eax, eax
push ebp
push 0x406346
push dword fs:[eax]
mov dword fs:[eax], esp
mov eax, edi
call fcn.00403930
mov eax, dword [ebp - 4]
call fcn.00403ad0
mov esi, eax
test esi, esi
jle 0x406326
mov ebx, 1
lea eax, [ebp - 4]
call fcn.00403d28
mov edx, dword [ebp - 4]
mov dl, byte [edx + ebx - 1]
xor dl, 0x49
mov byte [eax + ebx - 1], dl
inc ebx
dec esi
jne 0x40630c
mov eax, edi
mov edx, dword [ebp - 4]
call fcn.00403984
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x40634d
lea eax, [ebp - 4]
call fcn.00403930
ret

Function at 0x40771c
Capabilities:
Hash data with md5

Disassembly:
mov dword [eax], 0x67452301
mov dword [eax + 4], 0xefcdab89
mov dword [eax + 8], 0x98badcfe
mov dword [eax + 0xc], 0x10325476
xor edx, edx
mov dword [eax + 0x10], edx
xor edx, edx
mov dword [eax + 0x14], edx
add eax, 0x18
mov edx, 0x40
call fcn.00404d2c
ret

Function at 0x407a28
Capabilities:
Encode data using xor

Disassembly:
push ebx
push esi
mov esi, edx
dec esi
test esi, esi
jl 0x407a45
inc esi
xor edx, edx
xor ebx, ebx
mov bl, byte [eax + edx]
xor bx, 0xb822
mov byte [ecx + edx], bl
inc edx
dec esi
jne 0x407a34
pop esi
pop ebx
ret

Function at 0x407a48
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
push eax
mov eax, 2
add esp, 0xfffff004
push eax
dec eax
jne 0x407a51
mov eax, dword [ebp - 4]
add esp, 0xffffffb8
mov byte [ebp - 1], 0
push 0
push 0
push 2
push 0
push 1
push 0xc0000000
push eax
mov eax, dword [0x414dd4]
mov eax, dword [eax]
call eax
mov dword [ebp - 8], eax
xor eax, eax
push ebp
push 0x407af0
push dword fs:[eax]
mov dword fs:[eax], esp
cmp dword [ebp - 8], 0xffffffff
jne 0x407a9c
call fcn.00403488
jmp 0x407af7
lea ecx, [ebp - 0x204c]
mov eax, 0x40f150
mov edx, 0x2040
call fcn.00407a28
push 0
lea eax, [ebp - 0xc]
push eax
push 0x2040
lea eax, [ebp - 0x204c]
push eax
mov eax, dword [ebp - 8]
push eax
call sub.kernel32.dll_WriteFile_1
cmp eax, 1
sbb eax, eax
inc eax
mov byte [ebp - 1], al
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x407af7
mov eax, dword [ebp - 8]
push eax
mov eax, dword [0x414df8]
mov eax, dword [eax]
call eax
ret
mov al, byte [ebp - 1]
mov esp, ebp
pop ebp
ret