joyce8/EMBER2024-capa huggingface dataset:
Function at 0x1000fb60
Capabilities:
Get thread local storage value
Set thread local storage value

Disassembly:
push ebp
mov ebp, esp
push edi
push esi
mov eax, dword [0x10043018]
test eax, eax
je 0x1000fb8a
dec eax
push eax
call sub.KERNEL32.dll_TlsGetValue
cmp eax, 1
jbe 0x1000fb9f
cmp dword [eax + 4], 0
mov edi, eax
je 0x1000fb9f
add edi, 8
jmp 0x1000fc5e
mov ecx, 0x10043018
call fcn.1000fd10
push eax
call sub.KERNEL32.dll_TlsGetValue
cmp eax, 1
ja 0x1000fb7a
mov eax, dword [0x10043018]
test eax, eax
je 0x1000fc43
dec eax
push eax
call sub.KERNEL32.dll_TlsGetValue
cmp eax, 1
je 0x1000fc5c
mov esi, eax
test eax, eax
jne 0x1000fc12
movzx eax, byte [0x104ff0b8]
mov eax, dword [0x104ff078]
test eax, eax
jne 0x1000fbe4
call sub.KERNEL32.dll_GetProcessHeap
test eax, eax
je 0x1000fc70
mov dword [0x104ff078], eax
push 0x10
push 0
push eax
call sub.KERNEL32.dll_HeapAlloc
test eax, eax
je 0x1000fc70
mov dword [eax], 0x10043018
mov dword [eax + 4], 0
mov esi, eax
mov eax, dword [0x10043018]
test eax, eax
je 0x1000fc64
dec eax
push esi
push eax
call sub.KERNEL32.dll_TlsSetValue
mov ecx, dword [esi + 0xc]
cmp dword [esi + 4], 0
lea edi, [esi + 8]
mov dword [esi + 4], 1
mov dword [esi + 8], 0
mov dword [esi + 0xc], 0
je 0x1000fc5e
test ecx, ecx
je 0x1000fc5e
lock dec dword [ecx]
jne 0x1000fc5e
call fcn.1000fca0
jmp 0x1000fc5e
mov ecx, 0x10043018
call fcn.1000fd10
push eax
call sub.KERNEL32.dll_TlsGetValue
cmp eax, 1
jne 0x1000fbbc
xor edi, edi
mov eax, edi
pop esi
pop edi
pop ebp
ret
mov ecx, 0x10043018
call fcn.1000fd10
jmp 0x1000fc0b
mov ecx, 4
mov edx, 0x10
call fcn.10002ca0
ud2
Function at 0x1000fd10
Capabilities:
Allocate thread local storage

Disassembly:
push ebp
mov ebp, esp
push ebx
push edi
push esi
sub esp, 0x20
cmp dword [ecx + 4], 0
mov esi, ecx
je 0x1000fd79
lea ebx, [esi + 0xc]
mov dword [ebp - 0x14], 0
lea eax, [ebp - 0x14]
push 0
push eax
push 0
push ebx
call sub.KERNEL32.dll_InitOnceBeginInitialize
cmp eax, 1
mov dword [ebp - 0x10], eax
jne 0x1000fdaf
cmp dword [ebp - 0x14], 0
je 0x1000fd96
call sub.KERNEL32.dll_TlsAlloc
cmp eax, 0xffffffff
je 0x1000fdc3
mov edi, eax
inc eax
mov dword [esi], eax
mov eax, dword [0x104ff07c]
nop dword [eax + eax]
mov dword [esi + 8], eax
lock cmpxchg dword [0x104ff07c], esi
jne 0x1000fd60
push 0
push 0
push ebx
call sub.KERNEL32.dll_InitOnceComplete
jmp 0x1000fda5
call sub.KERNEL32.dll_TlsAlloc
cmp eax, 0xffffffff
mov dword [ebp - 0x10], eax
je 0x1000fdff
mov ecx, eax
xor eax, eax
inc ecx
lock cmpxchg dword [esi], ecx
jne 0x1000fd9a
mov edi, dword [ebp - 0x10]
jmp 0x1000fda5
mov edi, dword [esi]
jmp 0x1000fda4
mov edi, eax
push dword [ebp - 0x10]
call sub.KERNEL32.dll_TlsFree
dec edi
mov eax, edi
add esp, 0x20
pop esi
pop edi
pop ebx
pop ebp
ret
lea ecx, [ebp - 0x10]
lea edx, [ebp - 0x2c]
mov dword [ebp - 0x2c], 0
call fcn.1000fe30
ud2
push 0
push 4
push ebx
call sub.KERNEL32.dll_InitOnceComplete
lea ecx, [ebp - 0x2c]
mov edx, 0x104f6dd0
mov dword [ebp - 0x2c], 0x104f6d98
mov dword [ebp - 0x28], 1
mov dword [ebp - 0x1c], 0
mov dword [ebp - 0x24], str.called__Option::unwrap____on_a__None__value_rustc_d5c2e9c342b358556da91d61ed4133f6f50fc0c3library_alloc_srccollections_btree_navigate.rsIndex_out_of_bounds
mov dword [ebp - 0x20], 0
call fcn.10003210
ud2
lea ecx, [ebp - 0x10]
lea edx, [ebp - 0x2c]
mov dword [ebp - 0x2c], 0x104f6d98
mov dword [ebp - 0x28], 1
mov dword [ebp - 0x24], str.called__Option::unwrap____on_a__None__value_rustc_d5c2e9c342b358556da91d61ed4133f6f50fc0c3library_alloc_srccollections_btree_navigate.rsIndex_out_of_bounds
mov dword [ebp - 0x20], 0
mov dword [ebp - 0x1c], 0
call fcn.1000fe90
ud2
Function at 0x100112f0
Capabilities:
Get thread local storage value
Set thread local storage value

Disassembly:
push ebp
mov ebp, esp
push esi
mov eax, dword [0x10043008]
test eax, eax
je 0x10011315
dec eax
push eax
call sub.KERNEL32.dll_TlsGetValue
cmp eax, 1
jbe 0x1001132a
cmp dword [eax + 4], 0
je 0x1001132a
add eax, 8
pop esi
pop ebp
ret
mov ecx, 0x10043008
call fcn.1000fd10
push eax
call sub.KERNEL32.dll_TlsGetValue
cmp eax, 1
ja 0x10011309
mov eax, dword [0x10043008]
test eax, eax
je 0x100113a9
dec eax
push eax
call sub.KERNEL32.dll_TlsGetValue
cmp eax, 1
je 0x100113be
mov esi, eax
test eax, eax
jne 0x10011391
movzx eax, byte [0x104ff0b8]
mov eax, dword [0x104ff078]
test eax, eax
jne 0x10011363
call sub.KERNEL32.dll_GetProcessHeap
test eax, eax
je 0x100113cf
mov dword [0x104ff078], eax
push 0x10
push 0
push eax
call sub.KERNEL32.dll_HeapAlloc
test eax, eax
je 0x100113cf
mov dword [eax], 0x10043008
mov dword [eax + 4], 0
mov esi, eax
mov eax, dword [0x10043008]
test eax, eax
je 0x100113c3
dec eax
push esi
push eax
call sub.KERNEL32.dll_TlsSetValue
mov dword [esi + 4], 1
mov dword [esi + 8], 0
lea eax, [esi + 8]
mov byte [esi + 0xc], 0
pop esi
pop ebp
ret
mov ecx, 0x10043008
call fcn.1000fd10
push eax
call sub.KERNEL32.dll_TlsGetValue
cmp eax, 1
jne 0x1001133f
xor eax, eax
pop esi
pop ebp
ret
mov ecx, 0x10043008
call fcn.1000fd10
jmp 0x1001138a
mov ecx, 4
mov edx, 0x10
call fcn.10002ca0
ud2
Function at 0x10013d10
Capabilities:
Encrypt data using rc4 prga

Disassembly:
push ebp
mov ebp, esp
push ebx
push edi
push esi
sub esp, 0x14
movzx ebx, byte [edx + 0x1c]
mov dword [ebp - 0x20], ecx
xor eax, eax
mov ecx, 0
mov edi, edx
call 0x10013d2e
pop esi
cmp bl, 1
setne dl
sbb ecx, ecx
or cl, dl
cmp cl, 0xff
movzx edx, cl
je 0x10013d45
test edx, edx
jne 0x10013d6e
mov byte [ebp - 0x14], bl
movzx ebx, byte [edi + 0x1e]
cmp cl, 0xff
mov dword [ebp - 0x18], ebx
je 0x10013d58
test edx, edx
jne 0x10013d62
mov ecx, edi
call fcn.10013c20
movzx eax, al
movzx ebx, byte [ebp - 0x14]
xor ecx, ecx
test bl, bl
jne 0x10013dcf
jmp 0x10013d7b
mov dword [ebp - 0x18], 0
xor ecx, ecx
test bl, bl
jne 0x10013dcf
xor ecx, ecx
cmp byte [edi + 8], 6
lea edx, [edi + 8]
cmove edx, ecx
je 0x10013dcf
movzx ebx, byte [edx]
mov ecx, 6
add esi, dword [ebx*4 + 0x10013ee4]
jmp esi
add eax, ecx
movzx ecx, byte [ebp - 0x18]
mov edx, dword [edi + 4]
mov dword [ebp - 0x1c], ecx
add ecx, eax
cmp edx, ecx
jb 0x10013ed2
mov esi, edi
mov edi, dword [edi]
cmp edx, ecx
mov ebx, edi
lea ebx, [edi + ecx]
mov dword [ebp - 0x18], edi
mov dword [ebp - 0x14], ebx
jne 0x10013e06
movzx eax, byte [esi + 8]
mov byte [ebp - 0xd], al
mov ebx, dword [ebp - 0x14]
xor eax, eax
jmp 0x10013e72
movzx ebx, byte [esi + 8]
cmp bl, 3
mov byte [ebp - 0xd], bl
jae 0x10013e2f
add eax, dword [ebp - 0x1c]
mov esi, dword [ebp - 0x18]
sub eax, edx
lea esi, [edx + esi - 1]
nop
cmp byte [esi], 0x5c
je 0x10013ec1
dec esi
inc eax
jne 0x10013e20
jmp 0x10013dff
add eax, dword [ebp - 0x1c]
mov esi, dword [ebp - 0x18]
mov dword [ebp - 0x1c], edx
sub eax, edx
lea edi, [edx + esi - 1]
nop
movzx esi, byte [edi]
cmp esi, 0x2f
je 0x10013e5b
cmp esi, 0x5c
je 0x10013e5b
dec edi
inc eax
jne 0x10013e40
mov ebx, dword [ebp - 0x14]
mov edx, dword [ebp - 0x1c]
xor eax, eax
jmp 0x10013e72
mov edx, dword [ebp - 0x1c]
not eax
lea ecx, [ecx + eax + 1]
cmp edx, ecx
jb 0x10013ecb
mov ebx, dword [ebp - 0x18]
mov eax, 1
add ebx, ecx
sub edx, ecx
je 0x10013e96
mov cl, 9
cmp edx, 2
je 0x10013e9a
cmp edx, 1
jne 0x10013ea9
cmp byte [ebx], 0x2e
jne 0x10013ea9
xor ecx, ecx
cmp byte [ebp - 0xd], 3
setae cl
lea ecx, [ecx + ecx*2 + 7]
jmp 0x10013ea9
mov cl, 0xa
jmp 0x10013ea9
cmp byte [ebx], 0x2e
jne 0x10013ea9
cmp byte [ebx + 1], 0x2e
sete cl
xor cl, 9
mov esi, dword [ebp - 0x20]
add eax, edx
mov dword [esi], eax
mov byte [esi + 4], cl
mov dword [esi + 8], ebx
mov dword [esi + 0xc], edx
add esp, 0x14
pop esi
pop edi
pop ebx
pop ebp
ret
not eax
lea ecx, [ecx + eax + 1]
cmp edx, ecx
jae 0x10013e68
push 0x104f6338
jmp 0x10013ed7
push 0x104f6328
call fcn.10003890
add esp, 4
ud2
Function at 0x100155d0
Capabilities:
Resolve function by parsing pe exports

Disassembly:
push ebp
mov ebp, esp
push ebx
push edi
push esi
and esp, 0xfffffff0
sub esp, 0x490
call fcn.100155e4
Function at 0x100280c0
Capabilities:
Enumerate pe sections

Disassembly:
push ebp
mov ebp, esp
push ebx
push edi
push esi
and esp, 0xfffffff8
sub esp, 0x30
mov esi, dword [ebp + 0x20]
test esi, esi
je 0x100281e4
mov dword [esp], ecx
mov edi, dword [ebp + 0x1c]
mov ebx, dword [ebp + 0x18]
movzx ecx, byte [ebp + 0x10]
mov eax, dword [ebp + 0xc]
mov ch, dl
and ch, 0x3f
cmp ch, 0xd
je 0x10028205
and edx, 0x3f
cmp edx, 0xe
je 0x10028214
cmp edx, 0xf
jne 0x100281f3
mov eax, dword [edi + 0x68]
test eax, eax
je 0x100281f3
mov edx, dword [ebx + 0x18]
test edx, edx
je 0x10028276
mov ecx, dword [ebx + 0x14]
mov dword [esp + 0x28], edx
mov dword [esp + 0xc], edx
xor edi, edi
mov dword [esp + 0x24], eax
mov dword [esp + 8], ecx
mov ecx, edx
mov edx, dword [esp + 8]
jmp 0x10028148
mov dword [esp + 0xc], ecx
sub ecx, edi
jbe 0x10028187
mov esi, dword [ebp + 0xc]
shr ecx, 1
xor ebx, ebx
add ecx, edi
imul eax, ecx, 0x110
cmp dword [edx + eax + 0x108], esi
mov eax, 0xff
setne bl
cmovb ebx, eax
cmp bl, 1
je 0x10028140
movzx eax, bl
cmp eax, 0xff
jne 0x10028276
inc ecx
mov edi, ecx
mov ecx, dword [esp + 0xc]
sub ecx, edi
ja 0x10028148
test edi, edi
je 0x10028276
mov edx, dword [esp + 0x28]
dec edi
cmp edi, edx
jae 0x100282eb
mov edx, dword [esp + 8]
imul ecx, edi, 0x110
mov eax, dword [ebp + 0xc]
mov esi, dword [ebp + 0x20]
mov ebx, dword [ebp + 0x18]
cmp dword [edx + ecx + 0xa8], 0
jne 0x100281c9
add edx, ecx
mov ecx, dword [edx + 0xac]
cmp ecx, eax
jbe 0x10028298
mov edx, dword [esp]
movzx eax, byte [esp + 0x12]
movzx esi, word [esp + 0x10]
mov byte [esp + 6], al
mov word [esp + 4], si
jmp 0x10028279
mov dword [ecx + 4], 0
mov byte [ecx], 0x4b
jmp 0x10028290
mov eax, dword [esp]
mov dword [eax + 4], 0
mov byte [eax], 0x4b
jmp 0x10028290
movzx edx, cl
mov ecx, dword [esp]
push esi
push edi
push ebx
push eax
push dword [ebp + 0x14]
jmp 0x10028242
mov edx, ebx
movzx ebx, cl
lea ecx, [esp + 0x10]
push ebx
push eax
call fcn.100287e0
add esp, 8
movzx eax, byte [esp + 0x10]
cmp al, 0x4b
jne 0x1002824c
mov ecx, dword [esp]
mov edx, ebx
push esi
push edi
push dword [ebp + 0x18]
push dword [esp + 0x24]
push dword [esp + 0x24]
call fcn.10028300
add esp, 0x14
jmp 0x10028290
movzx ecx, byte [esp + 0x13]
mov edx, dword [esp]
movzx edi, word [esp + 0x11]
mov esi, dword [esp + 0x14]
movsd xmm0, qword [esp + 0x18]
mov byte [edx + 3], cl
mov word [edx + 1], di
mov byte [edx], al
mov dword [edx + 4], esi
movsd qword [edx + 8], xmm0
jmp 0x10028290
mov edx, dword [esp]
movzx eax, byte [esp + 6]
movzx esi, word [esp + 4]
mov byte [edx + 3], al
mov word [edx + 1], si
mov byte [edx], 0x37
mov dword [edx + 4], ecx
lea esp, [ebp - 0xc]
pop esi
pop edi
pop ebx
pop ebp
ret
sub eax, ecx
xor ecx, ecx
cmp byte [edx + 0xc9], 8
mov dword [esp + 8], edx
mov edi, eax
sete cl
shl ecx, 3
add ecx, dword [edx + 0xcc]
mov edx, dword [edx + 0xc4]
sub ecx, edx
add ecx, 4
sub edi, ecx
jb 0x100282e4
cmp edi, edx
jae 0x100282e4
mov edi, dword [esp + 0x24]
mov ecx, dword [esp]
mov edx, 1
add edi, 8
push esi
push edi
push ebx
push eax
push dword [esp + 0x18]
jmp 0x10028242
mov ecx, eax
jmp 0x100281c9
mov ecx, edi
push 0x104f604c
call fcn.10003240
add esp, 4
ud2
Function at 0x100292d0
Capabilities:
Encrypt data using rc4 prga

Disassembly:
push ebp
mov ebp, esp
push ebx
push edi
push esi
and esp, 0xfffffff8
sub esp, 0x58
mov ebx, dword [edx + 8]
mov dword [esp], ecx
mov eax, dword [edx]
mov ecx, dword [edx + 4]
cmp dword [ebx], 0
je 0x100292f4
mov edi, dword [ebx + 0xc]
mov ebx, dword [ebx + 4]
jmp 0x10029303
mov edi, dword [ebx + 4]
cmp edi, 6
jae 0x10029468
add ebx, 8
test edi, edi
mov dword [esp + 0xc], eax
mov dword [esp + 0x10], ecx
mov dword [esp + 0x14], ebx
mov dword [esp + 0x18], edi
mov dword [esp + 0x1c], edx
je 0x100293da
nop
dec edi
add ebx, 0x10
cmp edi, 0xffffffff
je 0x100293f3
lea eax, [ebx - 0x10]
lea ecx, [esp + 0x20]
lea esi, [esp + 0x38]
lea edx, [esp + 0xc]
movsd xmm0, qword [eax]
movsd xmm1, qword [eax + 8]
mov eax, dword [esp + 0x1c]
movsd qword [esp + 0x40], xmm1
movsd qword [esp + 0x38], xmm0
mov eax, dword [eax + 0xc]
push esi
push dword [eax + 0x20]
call fcn.100249a0
add esp, 8
mov eax, dword [esp + 0x20]
mov ecx, dword [esp + 0x24]
mov edx, eax
xor edx, 0x2e
or edx, ecx
je 0x1002941f
lea esi, [esp + 0x32]
mov edx, dword [esp + 0x28]
mov dword [esp + 0x14], ebx
mov dword [esp + 0x18], edi
mov esi, dword [esi]
mov dword [esp + 4], esi
lea esi, [esp + 0x32]
movzx esi, word [esi + 4]
mov word [esp + 8], si
movzx esi, word [esp + 0x30]
cmp si, word [ebp + 8]
mov esi, dword [esp + 0x2c]
jne 0x10029320
movzx edi, word [esp + 8]
mov ebx, dword [esp]
mov word [ebx + 0x16], di
mov edi, dword [esp + 4]
mov dword [ebx + 0x12], edi
mov dword [ebx + 4], ecx
movzx ecx, word [ebp + 8]
mov dword [ebx], eax
mov dword [ebx + 8], edx
mov dword [ebx + 0xc], esi
mov word [ebx + 0x10], cx
jmp 0x10029460
cmp dword [edx + 0x14], 0
mov eax, dword [esp]
jne 0x10029410
mov dword [edx + 0x14], 1
mov dword [edx + 0x18], 0
jmp 0x10029410
mov eax, dword [esp + 0x1c]
cmp dword [eax + 0x14], 0
jne 0x1002940d
mov ecx, dword [esp + 0xc]
sub ecx, dword [eax]
mov dword [eax + 0x14], 1
mov dword [eax + 0x18], ecx
mov eax, dword [esp]
mov dword [eax + 4], 0
mov dword [eax], 0x2e
jmp 0x10029460
lea edx, [esp + 0x32]
mov ecx, dword [esp]
mov edi, dword [esp + 0x2c]
mov esi, dword [edx]
movzx eax, word [edx + 4]
movzx edx, word [esp + 0x30]
mov dword [esp + 4], esi
mov dword [ecx + 0x12], esi
mov esi, dword [esp + 0x28]
mov word [ecx + 0x16], ax
mov word [esp + 8], ax
mov dword [ecx + 0xc], edi
mov dword [ecx + 8], esi
mov word [ecx + 0x10], dx
mov dword [ecx + 4], 0
mov dword [ecx], 0x2f
lea esp, [ebp - 0xc]
pop esi
pop edi
pop ebx
pop ebp
ret
mov ecx, edi
mov edx, 5
push 0x104f501c
call fcn.100038f0
add esp, 4
ud2
Function at 0x1003f500
Capabilities:
Write file on windows

Disassembly:
push ebx
sub esp, 0x18
mov dword [esp], 2
lea ebx, [esp + 0x24]
call fcn.10039ea0
mov dword [esp + 8], 0x1b
mov dword [esp + 0xc], eax
mov dword [esp + 4], 1
mov dword [esp], str.Mingw_w64_runtime_failure:_n
call sub.msvcrt.dll_fwrite
mov dword [esp], 2
call fcn.10039ea0
mov edx, dword [esp + 0x20]
mov dword [esp + 8], ebx
mov dword [esp], eax
mov dword [esp + 4], edx
call sub.msvcrt.dll_vfprintf
call sub.msvcrt.dll_abort
lea esi, [esi]

Function at 0x1003f560
Capabilities:
Allocate or change rwx memory

Disassembly:
push edi
push esi
push ebx
mov ebx, eax
sub esp, 0x30
mov esi, dword [0x104ffac4]
test esi, esi
jle 0x1003f680
mov eax, dword [0x104ffac8]
xor ecx, ecx
add eax, 0xc
mov edx, dword [eax]
cmp ebx, edx
jb 0x1003f594
mov edi, dword [eax + 4]
add edx, dword [edi + 8]
cmp ebx, edx
jb 0x1003f617
add ecx, 1
add eax, 0x14
cmp ecx, esi
jne 0x1003f580
mov dword [esp], ebx
call fcn.1003fd50
mov edi, eax
test eax, eax
je 0x1003f6a7
mov eax, dword [0x104ffac8]
lea ebx, [esi + esi*4]
shl ebx, 2
add eax, ebx
mov dword [eax + 0x10], edi
mov dword [eax], 0
call fcn.1003fe90
mov edx, dword [0x104ffac8]
add eax, dword [edi + 0xc]
mov dword [edx + ebx + 0xc], eax
lea edx, [esp + 0x14]
mov dword [esp + 8], 0x1c
mov dword [esp + 4], edx
mov dword [esp], eax
call dword [sym.imp.KERNEL32.dll_VirtualQuery]
sub esp, 0xc
test eax, eax
je 0x1003f687
mov eax, dword [esp + 0x28]
lea edx, [eax - 0x40]
and edx, 0xffffffbf
je 0x1003f610
lea edx, [eax - 4]
and edx, 0xfffffffb
jne 0x1003f620
add dword [0x104ffac4], 1
add esp, 0x30
pop ebx
pop esi
pop edi
ret
cmp eax, 2
mov edx, 4
mov eax, 0x40
mov ecx, dword [esp + 0x20]
cmove eax, edx
mov edx, dword [esp + 0x14]
add ebx, dword [0x104ffac8]
mov dword [ebx + 8], ecx
mov dword [ebx + 4], edx
mov dword [esp + 0xc], ebx
mov dword [esp + 8], eax
mov dword [esp + 4], ecx
mov dword [esp], edx
call dword [sym.imp.KERNEL32.dll_VirtualProtect]
sub esp, 0x10
test eax, eax
jne 0x1003f610
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [esp], str.__VirtualProtect_failed_with_code_0x_x
mov dword [esp + 4], eax
call fcn.1003f500
lea esi, [esi]
lea esi, [esi]
xor esi, esi
jmp 0x1003f59e
mov eax, dword [0x104ffac8]
mov eax, dword [eax + ebx + 0xc]
mov dword [esp + 8], eax
mov eax, dword [edi + 8]
mov dword [esp], str.__VirtualQuery_failed_for__d_bytes_at_address__p
mov dword [esp + 4], eax
call fcn.1003f500
mov dword [esp + 4], ebx
mov dword [esp], str.Address__p_has_no_image_section
call fcn.1003f500
lea esi, [esi]
nop
Function at 0x1003f9c0
Capabilities:
Get thread local storage value

Disassembly:
push ebp
push edi
push esi
push ebx
sub esp, 0x1c
mov dword [esp], 0x104ffad4
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov ebx, dword [0x104ffacc]
sub esp, 4
test ebx, ebx
je 0x1003fa15
mov ebp, dword [sym.imp.KERNEL32.dll_TlsGetValue]
mov edi, dword [sym.imp.KERNEL32.dll_GetLastError]
lea esi, [esi]
mov eax, dword [ebx]
mov dword [esp], eax
call ebp
sub esp, 4
mov esi, eax
call edi
test eax, eax
jne 0x1003fa0e
test esi, esi
je 0x1003fa0e
mov eax, dword [ebx + 4]
mov dword [esp], esi
call eax
mov ebx, dword [ebx + 8]
test ebx, ebx
jne 0x1003f9f0
mov dword [esp], 0x104ffad4
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
sub esp, 4
add esp, 0x1c
pop ebx
pop esi
pop edi
pop ebp
ret

Function at 0x1003fd50
Capabilities:
Parse pe header

Disassembly:
xor eax, eax
cmp word [0x10000000], 0x5a4d
jne 0x1003fd75
mov ecx, dword [0x1000003c]
cmp dword [ecx + 0x10000000], 0x4550
lea edx, [ecx + 0x10000000]
je 0x1003fd80
ret
cmp word [ecx + 0x10000018], 0x10b
jne 0x1003fd75
push esi
movzx eax, word [ecx + 0x10000014]
push ebx
movzx esi, word [ecx + 0x10000006]
mov ebx, dword [esp + 0xc]
lea eax, [edx + eax + 0x18]
sub ebx, 0x10000000
test si, si
je 0x1003fdc8
xor ecx, ecx
mov edx, dword [eax + 0xc]
cmp ebx, edx
jb 0x1003fdbe
add edx, dword [eax + 8]
cmp ebx, edx
jb 0x1003fdca
add ecx, 1
add eax, 0x28
cmp ecx, esi
jne 0x1003fdb0
xor eax, eax
pop ebx
pop esi
ret
Function at 0x402a24
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.00404100
test esi, esi
jne 0x402a5a
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.004041f0
jmp 0x402a78
call sub.kernel32.dll_GetCommandLineA
mov edi, eax
mov edx, ebx
mov eax, edi
call fcn.00402938
mov edi, eax
test esi, esi
je 0x402a78
cmp dword [ebx], 0
je 0x402a78
dec esi
jmp 0x402a61
add esp, 0x108
pop edi
pop esi
pop ebx
ret

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

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

Function at 0x40315c
Capabilities:
Query or enumerate registry value

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

Function at 0x403f00
Capabilities:
Write file on windows

Disassembly:
push ecx
cmp byte [0x4a604c], 0
je 0x403f61
cmp word [0x4a6220], 0xd7b2
jne 0x403f29
cmp dword [0x4a6228], 0
jbe 0x403f29
mov eax, 0x4a621c
call dword [0x4a6238]
push 0
lea eax, [esp + 4]
push eax
push 0x1e
push 0x4a1070
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 0x403f88
push 0xfffffffffffffff5
call sub.kernel32.dll_GetStdHandle
push eax
call sub.kernel32.dll_WriteFile
pop edx
ret
cmp byte [0x4a1034], 0
jne 0x403f7d
push 0
push 0x4a1068
push 0x4a1070
push 0
call sub.user32.dll_MessageBoxA
pop edx
ret

Function at 0x4040b4
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.004026fc
mov dword [eax], edi
mov edx, dword [ebp + 0x10]
mov dword [eax + 4], edx
mov byte [0x4a604d], 1
mov edx, dword [ebp + 8]
push edx
mov edx, dword [ebp + 0xc]
push edx
push eax
mov eax, 0x40407c
push eax
push esi
push ebx
call sub.kernel32.dll_CreateThread
pop edi
pop esi
pop ebx
pop ebp
ret 0xc
Function at 0x405f0c
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 0x405f72
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.00404370
mov eax, dword [ebp - 0x10]
lea edx, [ebp - 4]
call fcn.00402d14
mov ebx, eax
cmp dword [ebp - 4], 0
je 0x405f5c
xor ebx, ebx
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x405f79
lea eax, [ebp - 0x10]
call fcn.00404100
ret

Function at 0x40b474
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 0x40b4ad
mov ecx, eax
dec ecx
lea edx, [ebp - 0x100]
mov eax, ebx
call fcn.004041f0
jmp 0x40b4b6
mov eax, ebx
mov edx, esi
call fcn.00404154
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 4

Function at 0x40b4c0
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 0x40b4e1
mov al, byte [esp]
jmp 0x40b4e3
mov eax, ebx
pop edx
pop edi
pop esi
pop ebx
ret

Function at 0x40bb68
Capabilities:
Write file on windows

Disassembly:
add esp, 0xfffffbbc
push 0x400
lea ecx, [esp + 0x48]
call 0x40b9e0
mov eax, dword [0x4a54b8]
cmp byte [eax], 0
je 0x40bbe4
mov eax, dword [0x4a523c]
call fcn.00402b64
call fcn.00402864
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.00408ad8
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 0x40bc2c
push 0xfffffffffffffff4
call sub.kernel32.dll_GetStdHandle_1
push eax
call sub.kernel32.dll_WriteFile_1
jmp 0x40bc1a
push 0x40
lea eax, [esp + 8]
push eax
mov eax, dword [0x4a51d0]
mov eax, dword [eax + 4]
push eax
mov eax, dword [0x4a6668]
call fcn.00405420
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