joyce8/EMBER2024-capa huggingface dataset:
Function at 0x409a40
Capabilities:
Create directory

Disassembly:
mov eax, 0x200c
call fcn.0041cb40
mov eax, dword [section..data]
xor eax, esp
mov dword [esp + 0x2004], eax
push ebx
push ebp
push esi
push edi
mov edi, dword [0x427484]
mov ebp, ecx
test edi, edi
jne 0x409aa7
push 0x1000
mov edx, str.HOME
lea ecx, [esp + 0x14]
call fcn.004092d0
add esp, 4
test al, al
je 0x409b84
lea eax, [esp + 0x10]
push eax
call fcn.0041138d
mov edi, dword [0x427484]
add esp, 4
mov dword [edi*4 + 0x42a4b0], eax
inc edi
mov dword [0x427484], edi
xor esi, esi
test edi, edi
jle 0x409af4
nop dword [eax]
mov eax, dword [esi*4 + 0x42a4b0]
mov ecx, ebp
nop dword [eax]
mov dx, word [ecx]
cmp dx, word [eax]
jne 0x409ae6
test dx, dx
je 0x409ae2
mov dx, word [ecx + 2]
cmp dx, word [eax + 2]
jne 0x409ae6
add ecx, 4
add eax, 4
test dx, dx
jne 0x409ac0
xor eax, eax
jmp 0x409aeb
sbb eax, eax
or eax, 1
test eax, eax
je 0x409b1b
inc esi
cmp esi, edi
jl 0x409ab0
mov ecx, ebp
lea edx, [ecx + 2]
nop dword [eax]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x409b00
sub ecx, edx
sar ecx, 1
cmp ecx, 2
jne 0x409b1f
cmp word [ebp + 2], 0x3a
jne 0x409b1f
mov al, 1
jmp 0x409b6b
push 0
push ebp
call dword [sym.imp.KERNEL32.dll_CreateDirectoryW]
test eax, eax
setne bl
test eax, eax
jne 0x409b40
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0xb7
jne 0x409b69
mov bl, 1
cmp dword [0x427484], 0x400
jge 0x409b69
push ebp
call fcn.0041138d
mov ecx, dword [0x427484]
add esp, 4
mov dword [ecx*4 + 0x42a4b0], eax
inc ecx
mov dword [0x427484], ecx
mov al, bl
mov ecx, dword [esp + 0x2014]
pop edi
pop esi
pop ebp
pop ebx
xor ecx, esp
call fcn.0040a388
add esp, 0x200c
ret
mov ecx, str.HOME
call fcn.00409940
int3

Function at 0x409c90
Capabilities:
Check if file exists
Delete file
Get file attributes
Terminate process

Disassembly:
mov eax, dword [0x427488]
sub esp, 0x20
test eax, eax
je 0x409cc6
push 0x1388
push eax
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
test eax, eax
je 0x409cba
push 0
push dword [0x427488]
call dword [sym.imp.KERNEL32.dll_TerminateProcess]
push dword [0x427488]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
cmp byte [0x427ca4], 0
je 0x409d9b
push ebx
push ebp
push esi
mov eax, 0x414
mov dword [esp + 0xc], 0
push edi
mov edi, dword [sym.imp.SHELL32.dll_SHFileOperationW]
mov word [esp + 0x20], ax
lea eax, [esp + 0x10]
push eax
mov dword [esp + 0x18], 3
mov dword [esp + 0x1c], 0x427ca8
mov dword [esp + 0x20], 0x422cd0
mov dword [esp + 0x26], 0
mov dword [esp + 0x2a], 0
mov dword [esp + 0x2e], 0x422cd0
call edi
mov ebx, dword [sym.imp.KERNEL32.dll_Sleep]
xor esi, esi
mov ebp, dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
push 0x427ca8
call ebp
cmp eax, 0xffffffff
je 0x409d97
test al, 0x10
je 0x409d97
push 0x64
call ebx
mov eax, 0x414
mov dword [esp + 0x10], 0
mov word [esp + 0x20], ax
lea eax, [esp + 0x10]
push eax
mov dword [esp + 0x18], 3
mov dword [esp + 0x1c], 0x427ca8
mov dword [esp + 0x20], 0x422cd0
mov dword [esp + 0x26], 0
mov dword [esp + 0x2a], 0
mov dword [esp + 0x2e], 0x422cd0
call edi
inc esi
cmp esi, 0x14
jl 0x409d34
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x20
ret
Function at 0x40abb3
Capabilities:
Parse pe header

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

Function at 0x41292c
Capabilities:
Allocate thread local storage

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
push esi
push 0x41eabc
push 0x41eab4
push str.FlsAlloc
push 0x1f
call fcn.00412867
mov esi, eax
add esp, 0x10
test esi, esi
je 0x412960
push dword [ebp + 8]
mov ecx, esi
call dword [0x41d14c]
call esi
jmp 0x412966
call dword [sym.imp.KERNEL32.dll_TlsAlloc]
pop esi
pop ebp
ret 4

Function at 0x4129aa
Capabilities:
Get thread local storage value

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
push esi
push 0x41eacc
push 0x41eac4
push str.FlsGetValue
push 0x21
call fcn.00412867
mov esi, eax
add esp, 0x10
test esi, esi
je 0x4129e1
push dword [ebp + 8]
mov ecx, esi
call dword [0x41d14c]
call esi
pop esi
pop ebp
ret 4
pop esi
pop ebp
jmp dword [sym.imp.KERNEL32.dll_TlsGetValue]

Function at 0x4129e9
Capabilities:
Set thread local storage value

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
push esi
push 0x41ead4
push 0x41eacc
push str.FlsSetValue
push 0x22
call fcn.00412867
mov esi, eax
add esp, 0x10
test esi, esi
je 0x412a23
push dword [ebp + 0xc]
mov ecx, esi
push dword [ebp + 8]
call dword [0x41d14c]
call esi
pop esi
pop ebp
ret 8
pop esi
pop ebp
jmp dword [sym.imp.KERNEL32.dll_TlsSetValue]
Function at 0x4148ea
Capabilities:
Enumerate files on windows

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x264
mov eax, dword [section..data]
xor eax, ebp
mov dword [ebp - 4], eax
mov edx, dword [ebp + 0xc]
mov ecx, dword [ebp + 0x10]
push ebx
push esi
push edi
mov edi, dword [ebp + 8]
mov dword [ebp - 0x25c], ecx
cmp edx, edi
je 0x414935
movzx eax, word [edx]
lea ecx, [ebp - 0x255]
push eax
call fcn.00414a85
test al, al
jne 0x41492f
sub edx, 2
cmp edx, edi
jne 0x414915
mov ecx, dword [ebp - 0x25c]
movzx esi, word [edx]
cmp esi, 0x3a
jne 0x414957
lea eax, [edi + 2]
cmp edx, eax
je 0x414957
push ecx
xor ebx, ebx
push ebx
push ebx
push edi
call fcn.00414836
add esp, 0x10
jmp 0x414a51
push esi
lea ecx, [ebp - 0x255]
call fcn.00414a85
sub edx, edi
movzx eax, al
sar edx, 1
inc edx
neg eax
sbb eax, eax
xor ebx, ebx
push ebx
push ebx
and eax, edx
push ebx
mov dword [ebp - 0x260], eax
lea eax, [ebp - 0x254]
push eax
push ebx
push edi
call dword [sym.imp.KERNEL32.dll_FindFirstFileExW]
mov esi, eax
cmp esi, 0xffffffff
jne 0x41499a
push dword [ebp - 0x25c]
jmp 0x414947
mov ebx, dword [ebp - 0x25c]
push 0x2e
mov eax, dword [ebx + 4]
sub eax, dword [ebx]
sar eax, 2
mov dword [ebp - 0x25c], eax
pop eax
cmp word [ebp - 0x228], ax
jne 0x4149d7
cmp word [ebp - 0x226], 0
je 0x4149f8
cmp word [ebp - 0x226], ax
jne 0x4149d7
cmp word [ebp - 0x224], 0
je 0x4149f8
push ebx
push dword [ebp - 0x260]
lea eax, [ebp - 0x228]
push edi
push eax
call fcn.00414836
add esp, 0x10
mov dword [ebp - 0x264], eax
test eax, eax
jne 0x414a44
lea eax, [ebp - 0x254]
push eax
push esi
call dword [sym.imp.KERNEL32.dll_FindNextFileW]
push 0x2e
test eax, eax
pop eax
jne 0x4149b1
mov eax, dword [ebx + 4]
mov edx, dword [ebx]
sub eax, edx
mov ecx, dword [ebp - 0x25c]
sar eax, 2
cmp ecx, eax
jne 0x414a2c
push esi
call dword [sym.imp.KERNEL32.dll_FindClose]
xor eax, eax
jmp 0x414a51
push 0x414666
sub eax, ecx
push 4
push eax
lea eax, [edx + ecx*4]
push eax
call fcn.00419600
add esp, 0x10
jmp 0x414a21
push esi
call dword [sym.imp.KERNEL32.dll_FindClose]
mov eax, dword [ebp - 0x264]
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.0040a388
leave
ret
Function at 0x41c730
Capabilities:
Parse pe header

Disassembly:
push ebp
mov ebp, esp
mov eax, dword [ebp + 8]
mov ecx, 0x5a4d
cmp word [eax], cx
jne 0x41c75d
mov ecx, dword [eax + 0x3c]
add ecx, eax
cmp dword [ecx], 0x4550
jne 0x41c75d
mov edx, 0x10b
xor eax, eax
cmp word [ecx + 0x18], dx
sete al
pop ebp
ret
xor eax, eax
pop ebp
ret

Function at 0x407f80
Capabilities:
Packed with generic packer

Disassembly:
pushal
mov esi, section.UPX1
lea edi, [esi - 0x6000]
push edi
or ebp, 0xffffffff
jmp 0x407fa2
mov al, byte [esi]
inc esi
mov byte [edi], al
inc edi
add ebx, ebx
jne 0x407fa9
mov ebx, dword [esi]
sub esi, 0xfffffffc
adc ebx, ebx
jb 0x407f98
mov eax, 1
add ebx, ebx
jne 0x407fbb
mov ebx, dword [esi]
sub esi, 0xfffffffc
adc ebx, ebx
adc eax, eax
add ebx, ebx
jae 0x407fb0
jne 0x407fcc
mov ebx, dword [esi]
sub esi, 0xfffffffc
adc ebx, ebx
jae 0x407fb0
xor ecx, ecx
sub eax, 3
jb 0x407fe0
shl eax, 8
mov al, byte [esi]
inc esi
xor eax, 0xffffffff
je 0x408052
mov ebp, eax
add ebx, ebx
jne 0x407feb
mov ebx, dword [esi]
sub esi, 0xfffffffc
adc ebx, ebx
adc ecx, ecx
add ebx, ebx
jne 0x407ff8
mov ebx, dword [esi]
sub esi, 0xfffffffc
adc ebx, ebx
adc ecx, ecx
jne 0x40801c
inc ecx
add ebx, ebx
jne 0x408008
mov ebx, dword [esi]
sub esi, 0xfffffffc
adc ebx, ebx
adc ecx, ecx
add ebx, ebx
jae 0x407ffd
jne 0x408019
mov ebx, dword [esi]
sub esi, 0xfffffffc
adc ebx, ebx
jae 0x407ffd
add ecx, 2
cmp ebp, 0xfffff300
adc ecx, 1
lea edx, [edi + ebp]
cmp ebp, 0xfffffffc
jbe 0x40803c
mov al, byte [edx]
inc edx
mov byte [edi], al
inc edi
dec ecx
jne 0x40802d
jmp 0x407f9e
mov eax, dword [edx]
add edx, 4
mov dword [edi], eax
add edi, 4
sub ecx, 4
ja 0x40803c
add edi, ecx
jmp 0x407f9e
pop esi
mov edi, esi
mov ecx, 0x8f
mov al, byte [edi]
inc edi
sub al, 0xe8
cmp al, 1
ja 0x40805a
cmp byte [edi], 0
jne 0x40805a
mov eax, dword [edi]
mov bl, byte [edi + 4]
shr ax, 8
rol eax, 0x10
xchg ah, al
sub eax, edi
sub bl, 0xe8
add eax, esi
mov dword [edi], eax
add edi, 5
mov al, bl
loop 0x40805f
lea edi, [esi + 0x5000]
mov eax, dword [edi]
or eax, eax
je 0x4080d7
mov ebx, dword [edi + 4]
lea eax, [eax + esi + 0x8d64]
add ebx, esi
push eax
add edi, 8
call dword [esi + 0x8ddc]
xchg ebp, eax
mov al, byte [edi]
inc edi
or al, al
je 0x40808c
mov ecx, edi
jns 0x4080bb
movzx eax, word [edi]
inc edi
push eax
inc edi
mov ecx, 0xaef24857
push edi
dec eax
repne scasb al, byte es:[edi]
push ebp
call dword [esi + 0x8de4]
or eax, eax
je 0x4080d1
mov dword [ebx], eax
add ebx, 4
jmp 0x4080a9
call dword [esi + 0x8de0]
mov ebp, dword [esi + 0x8de8]
lea edi, [esi - 0x1000]
mov ebx, 0x1000
push eax
push esp
push 4
push ebx
push edi
call ebp
lea eax, [edi + 0x217]
and byte [eax], 0x7f
and byte [eax + 0x28], 0x7f
pop eax
push eax
push esp
push eax
push ebx
push edi
call ebp
pop eax
popal
lea eax, [esp - 0x80]
push 0
cmp esp, eax
jne 0x40810b
sub esp, 0xffffff80
jmp 0x402130
Function at 0x426b11
Capabilities:
Parse pe header

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x4314bb
mov eax, dword fs:[0]
push eax
sub esp, 0x3c
mov eax, dword [0x453460]
xor eax, ebp
mov dword [ebp - 0x10], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov ebx, edx
mov eax, dword [ebp + 8]
mov edx, dword [ebp + 0xc]
mov dword [ebx], 0
mov dword [ebp - 0x44], edx
mov dword [eax], 0
mov byte [edx], 0
mov edx, ecx
lea ecx, [ebp - 0x28]
mov dword [ebp - 0x34], eax
call fcn.004269d1
mov dword [ebp - 4], 0
cmp dword [eax + 0x14], 8
jb 0x426b72
mov eax, dword [eax]
push 0
push 0x80
push 3
push 0
push 1
push 0x80000000
push eax
call dword [0x433180]
mov esi, eax
mov dword [ebp - 4], 0xffffffff
cmp dword [ebp - 0x14], 8
jb 0x426ba5
push dword [ebp - 0x28]
call fcn.0042a617
add esp, 4
xor eax, eax
mov dword [ebp - 0x14], 7
mov dword [ebp - 0x18], 0
mov word [ebp - 0x28], ax
cmp esi, 0xffffffff
jne 0x426bc5
xor al, al
jmp 0x426d12
push 0xc
call fcn.0042a667
add esp, 4
mov dword [ebp - 0x2c], eax
mov dword [ebp - 4], 1
mov edi, dword [0x43319c]
test eax, eax
je 0x426bff
mov dword [eax], 0x44c2a4
mov byte [ebp - 4], 2
mov dword [eax], 0x44c4c8
mov dword [eax + 4], edi
mov dword [eax + 8], esi
mov byte [ebp - 4], 1
jmp 0x426c01
xor eax, eax
mov dword [ebp - 4], 0xffffffff
mov dword [ebp - 0x40], eax
mov dword [ebp - 4], 4
push 0
push 0
push 0
push 2
push 0
push esi
call dword [0x433068]
mov esi, eax
test esi, esi
jne 0x426c30
xor bl, bl
jmp 0x426d01
lea eax, [ebp - 0x30]
mov dword [ebp - 0x30], edi
push eax
lea ecx, [ebp - 0x38]
mov dword [ebp - 0x2c], esi
call fcn.00428a91
mov byte [ebp - 4], 5
push 0
push 0
push 0
push 4
push esi
call dword [str.uChL_B]
mov edi, eax
test edi, edi
jne 0x426c62
xor bl, bl
jmp 0x426cf5
mov eax, dword [0x433114]
lea ecx, [ebp - 0x3c]
mov dword [ebp - 0x30], eax
lea eax, [ebp - 0x30]
push eax
mov dword [ebp - 0x2c], edi
call fcn.00428b21
mov byte [ebp - 4], 6
mov eax, 0x5a4d
cmp word [edi], ax
jne 0x426cae
mov esi, dword [edi + 0x3c]
add esi, edi
cmp dword [esi], 0x4550
je 0x426c9c
mov dword [ebx], 1
jmp 0x426ce7
movzx eax, word [esi + 4]
cmp eax, 0x14c
je 0x426cba
cmp eax, 0x8664
je 0x426cb2
xor bl, bl
jmp 0x426ce9
mov dword [ebx], 3
jmp 0x426cde
mov edx, edi
mov dword [ebx], 2
mov ecx, esi
call fcn.00426d31
test eax, eax
je 0x426cde
mov eax, dword [eax + 0x10]
test al, 1
je 0x426cde
test al, 2
jne 0x426cde
mov eax, dword [ebp - 0x44]
mov byte [eax], 1
mov ecx, dword [ebp - 0x34]
movzx eax, word [esi + 0x5c]
mov dword [ecx], eax
mov bl, 1
mov byte [ebp - 4], 5
lea ecx, [ebp - 0x3c]
call fcn.00422081
mov byte [ebp - 4], 4
lea ecx, [ebp - 0x38]
call fcn.00422081
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x40]
call fcn.00422081
mov al, bl
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.00429cc4
mov esp, ebp
pop ebp
ret
Function at 0x426d31
Capabilities:
Enumerate pe sections

Disassembly:
push ebp
mov ebp, esp
push ecx
push esi
mov esi, ecx
mov dword [ebp - 4], edx
test esi, esi
jne 0x426d46
xor eax, eax
pop esi
mov esp, ebp
pop ebp
ret
mov eax, dword [esi + 0xec]
push edi
test eax, eax
je 0x426daa
mov edi, dword [esi + 0xe8]
test edi, edi
je 0x426daa
cmp eax, 0x48
jne 0x426daa
movzx eax, word [esi + 0x14]
lea edx, [esi + 0x18]
push ebx
movzx ebx, word [esi + 6]
add edx, eax
xor ecx, ecx
test ebx, ebx
je 0x426d8c
mov esi, dword [edx + 0xc]
cmp edi, esi
jb 0x426d84
mov eax, dword [edx + 0x10]
add eax, esi
cmp edi, eax
jb 0x426d8c
inc ecx
add edx, 0x28
cmp ecx, ebx
jb 0x426d74
cmp ebx, ecx
pop ebx
je 0x426daa
mov ecx, dword [edx + 0x14]
xor eax, eax
sub ecx, dword [edx + 0xc]
add ecx, edi
add ecx, dword [ebp - 4]
pop edi
pop esi
cmp dword [ecx], 0x48
cmove eax, ecx
mov esp, ebp
pop ebp
ret
pop edi
xor eax, eax
pop esi
mov esp, ebp
pop ebp
ret
Function at 0x42807e
Capabilities:
Reference http user-agent string

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x14
push 0x28
call fcn.0055d297
add esp, 4
mov dword [ebp - 4], eax
mov ebx, eax
mov edi, eax
xor eax, eax
mov ecx, 0xa
rep stosd dword es:[edi], eax
mov dword [ebx], 0x2301483
push ebx
add ebx, 0x10
push ebx
push 8
call fcn.0055d297
add esp, 4
pop ebx
mov dword [ebx], eax
mov edi, eax
mov esi, 0x627c8b
lodsd eax, dword [esi]
stosd dword es:[edi], eax
lodsd eax, dword [esi]
stosd dword es:[edi], eax
pop ebx
mov dword [ebp - 8], 0
mov dword [ebp - 0xc], 0
push dword [ebp + 8]
mov eax, 0x22ffaca
mov dword [ebp - 0x10], eax
lea eax, [ebp - 0x10]
push eax
lea eax, [ebp - 4]
push eax
mov eax, dword [esp]
mov eax, dword [eax]
mov eax, dword [eax]
call dword [eax + 0x24]
mov ebx, dword [ebp - 0x10]
test ebx, ebx
je 0x428106
push ebx
call fcn.0055d291
add esp, 4
mov eax, 0x2301405
mov dword [ebp - 0x10], eax
lea eax, [ebp - 0x10]
push eax
mov eax, 0x2301478
mov dword [ebp - 0x14], eax
lea eax, [ebp - 0x14]
push eax
lea eax, [ebp - 4]
push eax
mov eax, dword [esp]
mov eax, dword [eax]
mov eax, dword [eax]
call dword [eax + 0x28]
mov ebx, dword [ebp - 0x14]
test ebx, ebx
je 0x42813c
push ebx
call fcn.0055d291
add esp, 4
mov ebx, dword [ebp - 0x10]
test ebx, ebx
je 0x42814c
push ebx
call fcn.0055d291
add esp, 4
mov dword [ebp - 0x10], 0
push 0
lea eax, [ebp - 0x10]
push eax
lea eax, [ebp - 4]
push eax
mov eax, dword [esp]
mov eax, dword [eax]
mov eax, dword [eax]
call dword [eax + 0x2c]
mov dword [ebp - 0x14], eax
mov ebx, dword [ebp - 0x10]
test ebx, ebx
je 0x42817a
push ebx
call fcn.0055d291
add esp, 4
cmp dword [ebp - 0x14], 0
je 0x4281d2
lea eax, [ebp - 4]
push eax
mov eax, dword [esp]
mov eax, dword [eax]
mov eax, dword [eax]
call dword [eax + 0x58]
mov word [ebp - 8], ax
cmp word [ebp - 8], 0xc8
jne 0x4281d2
push 1
push 1
lea eax, [ebp - 4]
push eax
mov eax, dword [esp]
mov eax, dword [eax]
mov eax, dword [eax]
call dword [eax + 0x34]
mov dword [ebp - 0x10], eax
mov eax, dword [ebp - 0x10]
push eax
mov ebx, dword [ebp - 0xc]
test ebx, ebx
je 0x4281ce
push ebx
call fcn.0055d291
add esp, 4
pop eax
mov dword [ebp - 0xc], eax
lea eax, [ebp - 4]
push eax
mov eax, dword [esp]
mov eax, dword [eax]
mov eax, dword [eax]
call dword [eax + 0xc]
mov eax, dword [ebp - 0xc]
test eax, eax
je 0x4281fc
push eax
mov ebx, eax
call fcn.0040132e
inc eax
push eax
call fcn.0055d297
pop ecx
pop esi
mov edi, eax
rep movsb byte es:[edi], byte [esi]
jmp 0x428201
push eax
mov ebx, dword [ebp - 4]
push ebx
mov eax, dword [ebx]
call dword [eax]
call fcn.0055d291
add esp, 4
mov ebx, dword [ebp - 0xc]
test ebx, ebx
je 0x428222
push ebx
call fcn.0055d291
add esp, 4
pop eax
mov esp, ebp
pop ebp
ret 4
Function at 0x402d38
Capabilities:
Generate random numbers using the delphi lcg

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

Function at 0x403414
Capabilities:
Query or enumerate registry value

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

Function at 0x403e14
Capabilities:
Write file on windows

Disassembly:
push ecx
cmp byte [0x425044], 0
je 0x403e75
cmp word [0x425218], 0xd7b2
jne 0x403e3d
cmp dword [0x425220], 0
jbe 0x403e3d
mov eax, 0x425214
call dword [0x425230]
push 0
lea eax, [esp + 4]
push eax
push 0x1e
push 0x422078
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 0x403e9c
push 0xfffffffffffffff5
call sub.kernel32.dll_GetStdHandle
push eax
call sub.kernel32.dll_WriteFile
pop edx
ret
cmp byte [0x422020], 0
jne 0x403e91
push 0
push 0x422098
push 0x422078
push 0
call sub.user32.dll_MessageBoxA
pop edx
ret

Function at 0x403fc8
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.00402544
mov dword [eax], edi
mov edx, dword [ebp + 0x10]
mov dword [eax + 4], edx
mov byte [0x425045], 1
mov edx, dword [ebp + 8]
push edx
mov edx, dword [ebp + 0xc]
push edx
push eax
mov eax, 0x403f90
push eax
push esi
push ebx
call sub.kernel32.dll_CreateThread
pop edi
pop esi
pop ebx
pop ebp
ret 0xc
Function at 0x405180
Capabilities:
Get geographical location
Query or enumerate registry value

Disassembly:
push ebp
mov ebp, esp
add esp, 0xfffffee0
push ebx
push esi
mov dword [ebp - 4], eax
push 0x105
lea eax, [ebp - 0x11d]
push eax
push 0
call sub.kernel32.dll_GetModuleFileNameA
mov byte [ebp - 0x12], 0
lea eax, [ebp - 8]
push eax
push 0xf0019
push 0
push 0x4053b0
push 0x80000001
call sub.advapi32.dll_RegOpenKeyExA
test eax, eax
je 0x405203
lea eax, [ebp - 8]
push eax
push 0xf0019
push 0
push 0x4053b0
push 0x80000002
call sub.advapi32.dll_RegOpenKeyExA
test eax, eax
je 0x405203
lea eax, [ebp - 8]
push eax
push 0xf0019
push 0
push 0x4053cc
push 0x80000001
call sub.advapi32.dll_RegOpenKeyExA
test eax, eax
jne 0x40528c
xor eax, eax
push ebp
push 0x405285
push dword fs:[eax]
mov dword fs:[eax], esp
mov dword [ebp - 0x18], 5
lea eax, [ebp - 0x11d]
mov edx, 0x105
call fcn.00404fc8
lea eax, [ebp - 0x18]
push eax
lea eax, [ebp - 0x12]
push eax
push 0
push 0
lea eax, [ebp - 0x11d]
push eax
mov eax, dword [ebp - 8]
push eax
call sub.advapi32.dll_RegQueryValueExA
test eax, eax
je 0x40526a
lea eax, [ebp - 0x18]
push eax
lea eax, [ebp - 0x12]
push eax
push 0
push 0
push 0x4053ec
mov eax, dword [ebp - 8]
push eax
call sub.advapi32.dll_RegQueryValueExA
test eax, eax
je 0x40526a
mov byte [ebp - 0x12], 0
mov byte [ebp - 0xe], 0
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x40528c
mov eax, dword [ebp - 8]
push eax
call sub.advapi32.dll_RegCloseKey
ret
push 0x105
mov eax, dword [ebp - 4]
push eax
lea eax, [ebp - 0x11d]
push eax
call sub.kernel32.dll_lstrcpynA
push 5
lea eax, [ebp - 0xd]
push eax
push 3
call sub.kernel32.dll_GetThreadLocale
push eax
call sub.kernel32.dll_GetLocaleInfoA
xor esi, esi
cmp byte [ebp - 0x11d], 0
je 0x4053a6
cmp byte [ebp - 0xd], 0
jne 0x4052d3
cmp byte [ebp - 0x12], 0
je 0x4053a6
lea eax, [ebp - 0x11d]
push eax
call sub.kernel32.dll_lstrlenA
mov ebx, eax
lea eax, [ebp - 0x11d]
add ebx, eax
jmp 0x4052ec
dec ebx
cmp byte [ebx], 0x2e
je 0x4052fb
lea eax, [ebp - 0x11d]
cmp ebx, eax
jne 0x4052eb
lea eax, [ebp - 0x11d]
cmp ebx, eax
je 0x4053a6
inc ebx
cmp byte [ebp - 0x12], 0
je 0x405338
mov edx, ebx
sub edx, eax
mov eax, 0x105
sub eax, edx
push eax
lea eax, [ebp - 0x12]
push eax
push ebx
call sub.kernel32.dll_lstrcpynA
push 2
push 0
lea eax, [ebp - 0x11d]
push eax
call sub.kernel32.dll_LoadLibraryExA
mov esi, eax
test esi, esi
jne 0x4053a6
cmp byte [ebp - 0xd], 0
je 0x4053a6
lea eax, [ebp - 0x11d]
mov edx, ebx
sub edx, eax
mov eax, 0x105
sub eax, edx
push eax
lea eax, [ebp - 0xd]
push eax
push ebx
call sub.kernel32.dll_lstrcpynA
push 2
push 0
lea eax, [ebp - 0x11d]
push eax
call sub.kernel32.dll_LoadLibraryExA
mov esi, eax
test esi, esi
jne 0x4053a6
mov byte [ebp - 0xb], 0
lea eax, [ebp - 0x11d]
mov edx, ebx
sub edx, eax
mov eax, 0x105
sub eax, edx
push eax
lea eax, [ebp - 0xd]
push eax
push ebx
call sub.kernel32.dll_lstrcpynA
push 2
push 0
lea eax, [ebp - 0x11d]
push eax
call sub.kernel32.dll_LoadLibraryExA
mov esi, eax
mov eax, esi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
Function at 0x405ecc
Capabilities:
Inspect section memory permissions

Disassembly:
xor edx, edx
test eax, 0x4000000
je 0x405edb
or edx, 0x200
test eax, 0x20000000
je 0x405f0f
test eax, 0x40000000
je 0x405efa
test eax, 0x80000000
je 0x405ef5
or edx, 0x40
jmp 0x405f36
or edx, 0x20
jmp 0x405f36
test eax, 0x80000000
je 0x405f09
or edx, 0x80
jmp 0x405f36
or edx, 0x10
mov eax, edx
ret
test eax, 0x40000000
je 0x405f27
test eax, 0x80000000
je 0x405f22
or edx, 4
jmp 0x405f36
or edx, 2
jmp 0x405f36
test eax, 0x80000000
je 0x405f33
or edx, 8
jmp 0x405f36
or edx, 1
mov eax, edx
ret