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

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
mov eax, dword [ebp + 0x10]
sub esp, 0xc
push ebx
mov ebx, ecx
mov ecx, dword [ebp + 0xc]
push esi
push edi
test eax, eax
jg 0x463e3b
jl 0x463e2e
test ecx, ecx
jne 0x463e3b
xor eax, eax
xor edx, edx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0xc
cmp dword [ebx + 0x38], 0
mov edi, ecx
je 0x463f14
mov dword [esp + 0xc], eax
mov eax, dword [ebp + 8]
mov dword [esp + 0x10], eax
mov ecx, ebx
call fcn.004515f0
mov ecx, edx
mov esi, eax
mov dword [esp + 0x14], ecx
test ecx, ecx
jl 0x463eab
jg 0x463e6b
test esi, esi
je 0x463eab
mov eax, dword [esp + 0xc]
cmp eax, ecx
jg 0x463e7f
jl 0x463e79
cmp edi, esi
jae 0x463e7f
mov esi, edi
mov dword [esp + 0x14], eax
mov eax, dword [ebx + 0x1c]
push esi
push dword [eax]
push dword [esp + 0x18]
call fcn.00474950
mov eax, dword [ebx + 0x2c]
add esp, 0xc
mov ecx, dword [esp + 0xc]
sub edi, esi
sbb ecx, dword [esp + 0x14]
sub dword [eax], esi
mov eax, dword [ebx + 0x1c]
add dword [eax], esi
mov eax, dword [esp + 0x10]
jmp 0x463ece
mov eax, dword [ebx]
mov ecx, ebx
call dword [eax + 0x1c]
mov ecx, eax
cmp ecx, 0xffffffff
je 0x463efd
mov eax, dword [esp + 0x10]
add edi, 0xffffffff
mov esi, 1
mov byte [eax], cl
mov ecx, dword [esp + 0xc]
adc ecx, 0xffffffff
add eax, esi
mov dword [esp + 0xc], ecx
mov dword [esp + 0x10], eax
test ecx, ecx
jg 0x463e52
jl 0x463f01
test edi, edi
jne 0x463e52
mov eax, dword [ebp + 0xc]
mov edx, dword [ebp + 0x10]
sub eax, edi
sbb edx, ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0xc
mov ecx, dword [esp + 0xc]
mov eax, dword [ebp + 0xc]
mov edx, dword [ebp + 0x10]
sub eax, edi
sbb edx, ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0xc
mov eax, dword [ebx + 0x1c]
mov eax, dword [eax]
mov dword [esp + 0x10], eax
test eax, eax
je 0x463f63
mov eax, dword [ebx + 0x2c]
lea edx, [ebx + 0x2c]
mov dword [esp + 0x14], edx
mov eax, dword [eax]
test eax, eax
je 0x463f6a
cmp eax, ecx
mov esi, ecx
cmovb esi, eax
push esi
push dword [esp + 0x14]
push dword [ebp + 8]
call fcn.00474950
mov eax, dword [ebp + 8]
sub edi, esi
add eax, esi
add esp, 0xc
mov dword [esp + 0x10], eax
mov eax, dword [ebx + 0x2c]
sub dword [eax], esi
mov eax, dword [ebx + 0x1c]
add dword [eax], esi
mov esi, dword [esp + 0x10]
jmp 0x463f6d
lea eax, [ebx + 0x2c]
mov dword [esp + 0x14], eax
mov esi, dword [ebp + 8]
cmp dword [ebx + 0x4c], 0
je 0x463fd7
mov ecx, dword [ebx + 0xc]
lea eax, [ebx + 0x3c]
cmp dword [ecx], eax
jne 0x463f97
mov eax, dword [ebx + 0xc]
mov edx, dword [ebx + 0x54]
mov ecx, dword [ebx + 0x50]
sub edx, ecx
mov dword [eax], ecx
mov eax, dword [ebx + 0x1c]
mov dword [eax], ecx
mov eax, dword [esp + 0x14]
mov eax, dword [eax]
mov dword [eax], edx
cmp edi, 0xfff
jbe 0x463fc2
nop
push dword [ebx + 0x4c]
push 0xfff
push 1
push esi
call fcn.0048a8a6
add esp, 0x10
add esi, eax
sub edi, eax
cmp eax, 0xfff
jne 0x463fd7
cmp edi, eax
ja 0x463fa0
test edi, edi
je 0x463fd7
push dword [ebx + 0x4c]
push edi
push 1
push esi
call fcn.0048a8a6
add esp, 0x10
sub edi, eax
mov eax, dword [ebp + 0xc]
mov edx, dword [ebp + 0x10]
sub eax, edi
pop edi
pop esi
sbb edx, 0
pop ebx
mov esp, ebp
pop ebp
ret 0xc
Function at 0x464600
Capabilities:
Access peb ldr_data
Get process heap force flags

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x4a5717
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x10
push ebx
push esi
push edi
mov edi, ecx
mov dword [ebp - 0x10], edi
mov dword [ebp - 0x18], 0
mov dword [edi], 0x4bca94
mov dword [edi + 0x70], 0
mov dword [edi + 0x90], 0
mov dword [edi + 0x94], 0
mov dword [edi + 0x98], 0
mov dword [edi + 0x68], vtable.std::basic_ios_char__struct_std::char_traits_char__.0
sub esp, 8
mov dword [ebp - 4], 0
lea ebx, [edi + 4]
mov dword [ebp - 0x18], 1
push ebx
call fcn.004516e0
mov dword [ebp - 4], 1
mov eax, dword [edi]
push 8
mov dword [ebp - 0x1c], ebx
mov eax, dword [eax + 4]
mov dword [edi + eax], vtable.std::basic_ofstream_char__struct_std::char_traits_char__.0
mov eax, dword [edi]
mov ecx, dword [eax + 4]
lea eax, [ecx - 0x68]
mov dword [ecx + edi - 4], eax
mov dword [ebx], vtable.std::basic_streambuf_char__struct_std::char_traits_char__.0
call fcn.004728e6
add esp, 4
mov esi, eax
push 1
mov byte [ebp - 4], 2
call fcn.004710c2
mov dword [esi + 4], eax
lea eax, [edi + 4]
mov dword [eax + 0x34], esi
lea ebx, [eax + 4]
mov dword [eax + 0xc], ebx
lea esi, [eax + 8]
mov dword [eax + 0x10], esi
lea ecx, [eax + 0x18]
mov dword [eax + 0x20], ecx
lea edi, [eax + 0x14]
mov dword [eax + 0x1c], edi
lea edx, [eax + 0x24]
mov dword [eax + 0x2c], edx
add eax, 0x28
mov dword [ebp - 0x14], ebx
mov ebx, dword [ebp - 0x10]
mov dword [ebp - 0x1c], eax
mov dword [ebx + 0x34], eax
mov ebx, dword [ebp - 0x14]
mov dword [esi], 0
mov dword [ecx], 0
mov dword [eax], 0
mov eax, dword [ebp - 0x10]
mov dword [ebx], 0
mov ebx, dword [ebp - 0x10]
mov dword [edi], 0
mov dword [edx], 0
mov dword [eax + 0x14], esi
mov dword [ebx + 4], vtable.std::basic_filebuf_char__struct_std::char_traits_char__.0
mov byte [ebx + 0x4c], 0
mov byte [ebx + 0x41], 0
mov ebx, dword [ebp - 0x14]
mov dword [eax + 0x10], ebx
mov ebx, dword [ebp - 0x10]
mov dword [eax + 0x20], edi
mov dword [eax + 0x24], ecx
mov dword [eax + 0x30], edx
mov eax, dword [ebp - 0x1c]
mov dword [ebx + 0x34], eax
mov ebx, dword [ebp - 0x14]
mov dword [esi], 0
mov dword [ecx], 0
mov dword [eax], 0
mov eax, dword [0x4cffa0]
mov ecx, dword [0x4cffa4]
mov dword [ebx], 0
mov ebx, dword [ebp - 0x10]
mov dword [edi], 0
mov dword [edx], 0
mov dword [ebx + 0x50], 0
mov dword [ebx + 0x44], eax
mov dword [ebx + 0x48], ecx
mov dword [ebx + 0x3c], 0
mov eax, dword [ebp + 0xc]
lea ecx, [ebx + 4]
or eax, 2
mov byte [ebp - 4], 3
push eax
push dword [ebp + 8]
call fcn.00464ac0
test eax, eax
jne 0x4647c6
mov eax, dword [ebx]
push 0
mov ecx, dword [eax + 4]
xor eax, eax
add ecx, ebx
cmp dword [ecx + 0x38], eax
sete al
lea eax, [eax*4 + 2]
or eax, dword [ecx + 0xc]
push eax
call fcn.0044bf80
mov ecx, dword [ebp - 0xc]
mov eax, ebx
pop edi
pop esi
mov dword fs:[0], ecx
pop ebx
mov esp, ebp
pop ebp
ret 0x10
Function at 0x465420
Capabilities:
Contain obfuscated stackstrings

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x134
mov ecx, dword [ebp + 8]
mov eax, ecx
push esi
mov esi, dword [ebp + 0xc]
or eax, 1
bsr edx, esi
mov dword [ebp - 0x80], 0x10001
mov dword [ebp - 0x7c], 0x20001
mov dword [ebp - 0x78], 0x20002
mov dword [ebp - 0x74], 0x30003
mov dword [ebp - 0x70], 0x40003
mov dword [ebp - 0x6c], 0x40004
mov dword [ebp - 0x68], 0x50004
mov dword [ebp - 0x64], 0x50005
mov dword [ebp - 0x60], 0x60006
mov dword [ebp - 0x5c], 0x70006
mov dword [ebp - 0x58], 0x70007
mov dword [ebp - 0x54], 0x80007
mov dword [ebp - 0x50], 0x80008
mov dword [ebp - 0x4c], 0x90009
mov dword [ebp - 0x48], 0xa0009
mov dword [ebp - 0x44], 0xa000a
mov dword [ebp - 0x40], 0xb000a
mov dword [ebp - 0x3c], 0xb000b
mov dword [ebp - 0x38], 0xc000c
mov dword [ebp - 0x34], 0xd000c
mov dword [ebp - 0x30], 0xd000d
mov dword [ebp - 0x2c], 0xe000d
mov dword [ebp - 0x28], 0xe000e
mov dword [ebp - 0x24], 0xf000f
mov dword [ebp - 0x20], 0x10000f
mov dword [ebp - 0x1c], 0x100010
mov dword [ebp - 0x18], 0x110010
mov dword [ebp - 0x14], 0x110011
mov dword [ebp - 0x10], 0x120012
mov dword [ebp - 0xc], 0x130012
mov dword [ebp - 8], 0x130013
mov dword [ebp - 4], 0x140013
mov dword [ebp - 0x84], 0
je 0x465529
lea eax, [edx + 0x20]
jmp 0x46552c
bsr eax, eax
xor eax, 0x3f
mov dword [ebp - 0x120], 0xa
xor eax, 0x3f
mov dword [ebp - 0x11c], 0
xorps xmm0, xmm0
mov dword [ebp - 0x118], 0x64
movlpd qword [ebp - 0x130], xmm0
movlpd qword [ebp - 0x128], xmm0
movzx eax, word [ebp + eax*2 - 0x80]
mov dword [ebp - 0x114], 0
mov dword [ebp - 0x110], 0x3e8
mov dword [ebp - 0x10c], 0
mov dword [ebp - 0x108], 0x2710
mov dword [ebp - 0x104], 0
mov dword [ebp - 0x100], 0x186a0
mov dword [ebp - 0xfc], 0
mov dword [ebp - 0xf8], 0xf4240
mov dword [ebp - 0xf4], 0
mov dword [ebp - 0xf0], 0x989680
mov dword [ebp - 0xec], 0
mov dword [ebp - 0xe8], 0x5f5e100
mov dword [ebp - 0xe4], 0
mov dword [ebp - 0xe0], 0x3b9aca00
mov dword [ebp - 0xdc], 0
mov dword [ebp - 0xd8], 0x540be400
mov dword [ebp - 0xd4], 2
mov dword [ebp - 0xd0], 0x4876e800
mov dword [ebp - 0xcc], 0x17
mov dword [ebp - 0xc8], 0xd4a51000
mov dword [ebp - 0xc4], 0xe8
mov dword [ebp - 0xc0], 0x4e72a000
mov dword [ebp - 0xbc], 0x918
mov dword [ebp - 0xb8], 0x107a4000
mov dword [ebp - 0xb4], 0x5af3
mov dword [ebp - 0xb0], 0xa4c68000
mov dword [ebp - 0xac], 0x38d7e
mov dword [ebp - 0xa8], 0x6fc10000
mov dword [ebp - 0xa4], 0x2386f2
mov dword [ebp - 0xa0], 0x5d8a0000
mov dword [ebp - 0x9c], 0x1634578
mov dword [ebp - 0x98], 0xa7640000
mov dword [ebp - 0x94], 0xde0b6b3
mov dword [ebp - 0x90], 0x89e80000
mov dword [ebp - 0x8c], 0x8ac72304
cmp esi, dword [ebp + eax*8 - 0x12c]
ja 0x4656e6
jb 0x4656da
cmp ecx, dword [ebp + eax*8 - 0x130]
jae 0x4656e6
mov ecx, 1
sub eax, ecx
pop esi
mov esp, ebp
pop ebp
ret
xor ecx, ecx
sub eax, ecx
pop esi
mov esp, ebp
pop ebp
ret
Function at 0x4736c5
Capabilities:
Parse pe header

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

Function at 0x48fc0f
Capabilities:
Allocate thread local storage

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
push esi
push 0x4abbc4
push 0x4abbbc
push str.FlsAlloc
push 0x1f
call fcn.0048fa3a
mov esi, eax
add esp, 0x10
test esi, esi
je 0x48fc43
push dword [ebp + 8]
mov ecx, esi
call dword [0x4a7300]
call esi
jmp 0x48fc49
call dword [sym.imp.KERNEL32.dll_TlsAlloc]
pop esi
pop ebp
ret 4

Function at 0x48fc8d
Capabilities:
Get thread local storage value

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
push esi
push 0x4abbd4
push 0x4abbcc
push str.FlsGetValue
push 0x21
call fcn.0048fa3a
mov esi, eax
add esp, 0x10
test esi, esi
je 0x48fcc4
push dword [ebp + 8]
mov ecx, esi
call dword [0x4a7300]
call esi
pop esi
pop ebp
ret 4
pop esi
pop ebp
jmp dword [sym.imp.KERNEL32.dll_TlsGetValue]

Function at 0x48fccc
Capabilities:
Set thread local storage value

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
push esi
push 0x4abbdc
push 0x4abbd4
push str.FlsSetValue
push 0x22
call fcn.0048fa3a
mov esi, eax
add esp, 0x10
test esi, esi
je 0x48fd06
push dword [ebp + 0xc]
mov ecx, esi
push dword [ebp + 8]
call dword [0x4a7300]
call esi
pop esi
pop ebp
ret 8
pop esi
pop ebp
jmp dword [sym.imp.KERNEL32.dll_TlsSetValue]

Function at 0x4932e4
Capabilities:
Get disk information

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0xc
mov eax, dword [0x4c9060]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 8]
cmp eax, 0x1a
jbe 0x493327
call fcn.00488ed4
mov dword [eax], 0xf
call fcn.00488ee7
mov dword [eax], 0xd
call fcn.004860fa
xor eax, eax
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00473163
leave
ret
test eax, eax
jne 0x49332e
inc eax
jmp 0x49331b
add eax, 0x40
push 0x3a
mov word [ebp - 0xc], ax
pop eax
mov word [ebp - 0xa], ax
push 0x5c
pop eax
mov word [ebp - 8], ax
xor eax, eax
mov word [ebp - 6], ax
lea eax, [ebp - 0xc]
push eax
call dword [sym.imp.KERNEL32.dll_GetDriveTypeW]
mov ecx, eax
test ecx, ecx
je 0x493319
xor eax, eax
cmp ecx, 1
setne al
jmp 0x49331b
Function at 0x4961ed
Capabilities:
Read file on windows

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
mov eax, 0x101c
call fcn.00473b10
mov eax, dword [0x4c9060]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 0x14]
push ebx
push dword [ebp + 8]
mov dword [ebp - 0x100c], eax
call fcn.0048a9f1
pop ecx
mov ecx, dword [ebp + 8]
mov ebx, eax
cmp dword [ecx + 8], 0
jne 0x49622f
mov eax, dword [ebp + 0xc]
mov edx, dword [ebp + 0x10]
jmp 0x49638b
mov eax, dword [ecx]
sub eax, dword [ecx + 4]
push esi
push edi
push 0
cdq
push 2
push edx
push eax
call fcn.004a0ab0
push dword [ebp - 0x100c]
mov ecx, ebx
mov dword [ebp - 0x1008], eax
mov esi, ebx
mov dword [ebp - 0x1018], edx
and ecx, 0x3f
sar esi, 6
imul edi, ecx, 0x38
push 0
mov eax, dword [esi*4 + 0x4cc1c0]
push dword [eax + edi + 0x24]
push dword [eax + edi + 0x20]
push ebx
call fcn.00495d76
mov ecx, dword [esi*4 + 0x4cc1c0]
add esp, 0x14
mov dword [ebp - 0x1010], eax
mov eax, edx
mov edx, dword [ebp - 0x1010]
mov dword [ebp - 0x101c], eax
cmp edx, dword [ecx + edi + 0x20]
jne 0x496384
cmp eax, dword [ecx + edi + 0x24]
jne 0x496384
push 0
lea eax, [ebp - 0x1014]
push eax
push 0x1000
lea eax, [ebp - 0x1004]
push eax
push dword [ecx + edi + 0x18]
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x496384
push dword [ebp - 0x100c]
push 0
push dword [ebp + 0x10]
push dword [ebp + 0xc]
push ebx
call fcn.00495d76
add esp, 0x14
test edx, edx
jl 0x496384
jg 0x4962fa
test eax, eax
jb 0x496384
mov ebx, dword [ebp - 0x1018]
mov eax, dword [ebp - 0x1014]
test ebx, ebx
jg 0x496384
jl 0x496314
cmp dword [ebp - 0x1008], eax
ja 0x496384
lea edi, [ebp - 0x1004]
xor edx, edx
add edi, eax
lea ecx, [ebp - 0x1004]
xor esi, esi
cmp dword [ebp - 0x1008], edx
jne 0x496332
test ebx, ebx
je 0x49636b
cmp ecx, edi
jae 0x49636b
mov al, byte [ecx]
cmp al, 0xd
jne 0x49634c
lea eax, [edi - 1]
cmp ecx, eax
jae 0x496358
cmp byte [ecx + 1], 0xa
jne 0x496358
inc ecx
jmp 0x496358
movzx eax, al
movsx eax, byte [eax + 0x4c94b0]
add ecx, eax
add esi, 1
adc edx, 0
inc ecx
cmp esi, dword [ebp - 0x1008]
jne 0x496332
cmp edx, ebx
jne 0x496332
lea eax, [ebp - 0x1004]
sub ecx, eax
mov eax, ecx
cdq
add eax, dword [ebp - 0x1010]
adc edx, dword [ebp - 0x101c]
jmp 0x496389
or edx, 0xffffffff
mov eax, edx
pop edi
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
pop ebx
call fcn.00473163
leave
ret
Function at 0x49642a
Capabilities:
Read file on windows

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x18
mov eax, dword [ebp + 8]
mov ecx, eax
push ebx
mov ebx, dword [ebp + 0xc]
and eax, 0x3f
sar ecx, 6
push esi
push edi
imul edi, eax, 0x38
mov eax, dword [ecx*4 + 0x4cc1c0]
mov dword [ebp - 0xc], ecx
mov ecx, dword [edi + eax + 0x18]
mov dword [ebp - 0x14], ecx
mov ecx, dword [ebp + 0x10]
test ecx, ecx
je 0x49646a
cmp byte [ebx], 0xa
jne 0x49646a
or byte [edi + eax + 0x28], 4
jmp 0x49646f
and byte [edi + eax + 0x28], 0xfb
add ecx, ebx
mov eax, ebx
mov dword [ebp - 0x10], ecx
mov esi, ebx
mov dword [ebp - 8], eax
cmp ebx, ecx
jae 0x49656e
mov dl, byte [eax]
cmp dl, 0x1a
je 0x496551
inc eax
cmp dl, 0xd
je 0x49649b
mov dword [ebp - 8], eax
mov byte [esi], dl
jmp 0x4964c1
cmp eax, ecx
jae 0x4964cf
mov cl, byte [eax]
xor eax, eax
cmp cl, 0xa
sete al
inc eax
add dword [ebp - 8], eax
cmp cl, 0xa
sete al
dec al
and al, 3
add al, 0xa
mov byte [esi], al
mov eax, dword [ebp - 8]
mov ecx, dword [ebp - 0x10]
xor edx, edx
inc edx
add esi, edx
cmp eax, ecx
jb 0x496483
jmp 0x49656e
push 0
lea eax, [ebp - 0x10]
push eax
push 1
lea eax, [ebp - 1]
push eax
push dword [ebp - 0x14]
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x49654c
cmp dword [ebp - 0x10], 0
je 0x49654c
mov ecx, dword [ebp - 0xc]
mov eax, dword [ecx*4 + 0x4cc1c0]
test byte [eax + edi + 0x28], 0x48
je 0x496526
mov dl, byte [ebp - 1]
lea eax, [esi + 1]
mov dword [ebp - 0x14], eax
cmp dl, 0xa
jne 0x496511
mov byte [esi], dl
jmp 0x496522
mov byte [esi], 0xd
mov eax, dword [ecx*4 + 0x4cc1c0]
mov byte [eax + edi + 0x2a], dl
mov eax, dword [ebp - 0x14]
mov esi, eax
jmp 0x49656e
cmp byte [ebp - 1], 0xa
jne 0x496535
cmp esi, ebx
jne 0x496535
mov byte [esi], 0xa
jmp 0x49656d
push 1
push 0xffffffffffffffff
push 0xffffffffffffffff
push dword [ebp + 8]
call fcn.00495d94
add esp, 0x10
cmp byte [ebp - 1], 0xa
je 0x49656e
mov byte [esi], 0xd
jmp 0x49656d
mov ecx, dword [ebp - 0xc]
mov ecx, dword [ecx*4 + 0x4cc1c0]
mov al, byte [ecx + edi + 0x28]
test al, 0x40
jne 0x49656b
or al, 2
mov byte [ecx + edi + 0x28], al
jmp 0x49656e
mov byte [esi], dl
inc esi
sub esi, ebx
pop edi
mov eax, esi
pop esi
pop ebx
leave
ret
Function at 0x496577
Capabilities:
Read file on windows

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x1c
mov eax, dword [ebp + 8]
mov ecx, eax
push ebx
mov ebx, dword [ebp + 0xc]
and eax, 0x3f
push esi
sar ecx, 6
push edi
imul edi, eax, 0x38
mov dword [ebp - 8], ecx
mov eax, dword [ecx*4 + 0x4cc1c0]
push 0xa
pop edx
mov dword [ebp - 0x18], edx
mov ecx, dword [eax + edi + 0x18]
mov dword [ebp - 0x1c], ecx
mov ecx, dword [ebp + 0x10]
test ecx, ecx
je 0x4965bd
cmp word [ebx], dx
jne 0x4965bd
or byte [eax + edi + 0x28], 4
jmp 0x4965c2
and byte [eax + edi + 0x28], 0xfb
lea edx, [ebx + ecx*2]
mov eax, ebx
mov dword [ebp - 0xc], edx
mov esi, ebx
mov dword [ebp - 4], eax
cmp ebx, edx
jae 0x496725
mov dword [ebp - 0x10], 0xd
movzx ecx, word [eax]
mov edx, ecx
mov dword [ebp - 0x14], edx
mov edx, dword [ebp - 0xc]
cmp ecx, 0x1a
je 0x496705
add eax, 2
cmp cx, word [ebp - 0x10]
je 0x496603
mov dword [ebp - 4], eax
mov word [esi], cx
jmp 0x496639
cmp eax, edx
jae 0x496647
movzx eax, word [eax]
xor ecx, ecx
cmp ax, word [ebp - 0x18]
mov edx, eax
push 0xa
sete cl
xor eax, eax
lea ecx, [ecx*2 + 2]
add dword [ebp - 4], ecx
pop ecx
cmp dx, cx
mov edx, dword [ebp - 0xc]
sete al
dec eax
and eax, 3
add eax, ecx
mov word [esi], ax
mov eax, dword [ebp - 4]
push 2
pop ecx
add esi, ecx
cmp eax, edx
jb 0x4965de
jmp 0x496725
push 0
lea eax, [ebp - 0x18]
push eax
push 2
lea eax, [ebp - 4]
push eax
push dword [ebp - 0x1c]
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x496700
cmp dword [ebp - 0x18], 0
je 0x496700
mov edx, dword [ebp - 8]
push 0xa
mov eax, dword [edx*4 + 0x4cc1c0]
test byte [eax + edi + 0x28], 0x48
je 0x4966d6
lea eax, [esi + 2]
mov dword [ebp - 0x1c], eax
mov ax, word [ebp - 4]
pop ecx
mov word [ebp - 2], ax
cmp ax, cx
jne 0x49669a
mov word [esi], cx
jmp 0x4966d1
push 0xd
pop ecx
mov word [esi], cx
movzx ecx, ax
mov eax, dword [edx*4 + 0x4cc1c0]
mov dx, word [ebp - 2]
shr ecx, 8
push 0xa
mov byte [eax + edi + 0x2a], dl
mov edx, dword [ebp - 8]
mov eax, dword [edx*4 + 0x4cc1c0]
mov byte [eax + edi + 0x2b], cl
mov eax, dword [edx*4 + 0x4cc1c0]
pop ecx
mov byte [eax + edi + 0x2c], cl
mov esi, dword [ebp - 0x1c]
jmp 0x496725
pop eax
cmp word [ebp - 4], ax
jne 0x4966e6
cmp esi, ebx
jne 0x4966e6
mov word [esi], ax
jmp 0x496722
push 1
push 0xffffffffffffffff
push 0xfffffffffffffffe
push dword [ebp + 8]
call fcn.00495d94
add esp, 0x10
push 0xa
pop eax
cmp word [ebp - 4], ax
je 0x496725
push 0xd
pop eax
jmp 0x4966e1
mov edx, dword [ebp - 8]
mov edx, dword [edx*4 + 0x4cc1c0]
mov al, byte [edx + edi + 0x28]
test al, 0x40
jne 0x49671f
or al, 2
mov byte [edx + edi + 0x28], al
jmp 0x496725
mov word [esi], cx
add esi, 2
sub esi, ebx
and esi, 0xfffffffe
pop edi
mov eax, esi
pop esi
pop ebx
leave
ret
Function at 0x499722
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 0x4997bf
push ebx
push esi
call fcn.004996eb
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.004934d1
add esp, 0x24
mov dword [ebp - 4], eax
test eax, eax
jne 0x49976c
push esi
call dword [sym.imp.KERNEL32.dll_FreeEnvironmentStringsW]
xor eax, eax
jmp 0x4997be
push edi
push eax
call fcn.00490347
mov edi, eax
pop ecx
push ebx
test edi, edi
jne 0x49978c
call fcn.0048f75b
pop ecx
push esi
call dword [sym.imp.KERNEL32.dll_FreeEnvironmentStringsW]
xor eax, eax
jmp 0x4997bd
push ebx
push dword [ebp - 4]
push edi
push dword [ebp - 8]
push esi
push ebx
push ebx
call fcn.004934d1
add esp, 0x20
test eax, eax
jne 0x4997ab
push edi
call fcn.0048f75b
jmp 0x4997b3
push ebx
call fcn.0048f75b
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 0x4997c2
Capabilities:
Query environment variable

Disassembly:
mov edi, edi
push esi
call dword [sym.imp.KERNEL32.dll_GetEnvironmentStringsW]
mov esi, eax
test esi, esi
jne 0x4997d3
pop esi
ret
push ebx
push edi
push esi
call fcn.004996eb
mov ebx, eax
sub ebx, esi
and ebx, 0xfffffffe
push ebx
call fcn.00490347
mov edi, eax
pop ecx
pop ecx
test edi, edi
je 0x4997fb
push ebx
push esi
push edi
call fcn.00474950
add esp, 0xc
push 0
call fcn.0048f75b
pop ecx
push esi
call dword [sym.imp.KERNEL32.dll_FreeEnvironmentStringsW]
mov eax, edi
pop edi
pop ebx
pop esi
ret

Function at 0x499bcb
Capabilities:
Set environment variable

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
pop ebp
jmp fcn.00499810

Function at 0x49be04
Capabilities:
Get geographical location

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
push ecx
push esi
push edi
call fcn.004916f9
mov esi, dword [ebp + 8]
mov edi, eax
push 2
lea eax, [ebp - 4]
mov ecx, esi
push eax
and ecx, 0x3ff
push 0x20000001
or ecx, 0x400
push ecx
call dword [sym.imp.KERNEL32.dll_GetLocaleInfoW]
test eax, eax
je 0x49be73
cmp esi, dword [ebp - 4]
je 0x49be6e
cmp dword [ebp + 0xc], 0
je 0x49be6e
mov esi, dword [edi + 0x50]
lea ecx, [esi + 2]
mov ax, word [esi]
add esi, 2
test ax, ax
jne 0x49be4b
push dword [edi + 0x50]
sub esi, ecx
sar esi, 1
call fcn.0049b956
pop ecx
xor ecx, ecx
cmp eax, esi
setne cl
mov eax, ecx
jmp 0x49be75
xor eax, eax
inc eax
jmp 0x49be75
xor eax, eax
pop edi
pop esi
leave
ret
Function at 0x49beda
Capabilities:
Get geographical location

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x18
mov eax, dword [0x4c9060]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 0xc]
push ebx
mov ebx, dword [ebp + 0x10]
push esi
mov esi, dword [ebp + 8]
push edi
mov dword [ebp - 0x18], eax
call fcn.004916f9
add eax, 0x50
lea edi, [ebp - 0x10]
mov dword [ebp - 0x14], eax
xor eax, eax
stosd dword es:[edi], eax
stosd dword es:[edi], eax
stosd dword es:[edi], eax
call fcn.004916f9
lea ecx, [ebp - 0x10]
xor edx, edx
mov dword [eax + 0x34c], ecx
lea ecx, [esi + 0x80]
mov eax, dword [ebp - 0x14]
mov dword [eax], esi
lea edi, [eax + 4]
mov dword [edi], ecx
test ecx, ecx
je 0x49bf51
cmp word [ecx], dx
je 0x49bf51
mov eax, dword [0x4ac984]
push edi
dec eax
push eax
push 0x4ac870
call fcn.0049be79
mov eax, dword [ebp - 0x14]
add esp, 0xc
xor edx, edx
mov dword [ebp - 0x10], edx
mov eax, dword [eax]
test eax, eax
je 0x49bfc4
cmp word [eax], dx
je 0x49bfc4
mov eax, dword [edi]
test eax, eax
je 0x49bf75
cmp word [eax], dx
je 0x49bf75
lea eax, [ebp - 0x10]
push eax
call fcn.0049b85c
jmp 0x49bf7e
lea eax, [ebp - 0x10]
push eax
call fcn.0049b8f7
cmp dword [ebp - 0x10], 0
pop ecx
jne 0x49bfee
mov eax, dword [0x4ac86c]
push dword [ebp - 0x14]
dec eax
push eax
push 0x4ac560
call fcn.0049be79
add esp, 0xc
test al, al
je 0x49bfee
mov eax, dword [edi]
xor edi, edi
test eax, eax
je 0x49bfb9
cmp word [eax], di
je 0x49bfb9
lea eax, [ebp - 0x10]
push eax
call fcn.0049b85c
pop ecx
jmp 0x49bff0
lea eax, [ebp - 0x10]
push eax
call fcn.0049b8f7
jmp 0x49bfb6
mov eax, dword [edi]
test eax, eax
je 0x49bfdb
cmp word [eax], dx
je 0x49bfdb
lea eax, [ebp - 0x10]
push eax
call fcn.0049b811
pop ecx
jmp 0x49bfee
mov dword [ebp - 0x10], 0x104
call dword [sym.imp.KERNEL32.dll_GetUserDefaultLCID]
mov dword [ebp - 8], eax
mov dword [ebp - 0xc], eax
xor edi, edi
cmp dword [ebp - 0x10], 0
je 0x49c0b9
lea eax, [ebp - 0x10]
push eax
lea eax, [esi + 0x100]
neg esi
sbb esi, esi
and esi, eax
push esi
call fcn.0049bcfe
mov esi, eax
pop ecx
pop ecx
test esi, esi
je 0x49c0b9
movzx ecx, si
push ecx
call dword [sym.imp.KERNEL32.dll_IsValidCodePage]
test eax, eax
je 0x49c0b9
push 1
push dword [ebp - 0xc]
call dword [sym.imp.KERNEL32.dll_IsValidLocale]
test eax, eax
je 0x49c0b9
mov eax, dword [ebp - 0x18]
test eax, eax
je 0x49c046
mov dword [eax], esi
mov eax, dword [ebp - 0x14]
push edi
push 0x55
add eax, 0x250
push eax
push dword [ebp - 0xc]
call fcn.0048fea8
test ebx, ebx
je 0x49c0b4
push edi
push 0x55
lea eax, [ebx + 0x120]
push eax
push dword [ebp - 0xc]
call fcn.0048fea8
push 0x40
push ebx
push 0x1001
push dword [ebp - 0xc]
call dword [sym.imp.KERNEL32.dll_GetLocaleInfoW]
test eax, eax
je 0x49c0b9
push 0x40
lea eax, [ebx + 0x80]
push eax
push 0x1002
push dword [ebp - 8]
call dword [sym.imp.KERNEL32.dll_GetLocaleInfoW]
test eax, eax
je 0x49c0b9
push 0xa
push 0x10
lea ecx, [ebx + 0x100]
push ecx
push esi
call fcn.0049fc51
add esp, 0x10
xor eax, eax
inc eax
jmp 0x49c0bb
xor eax, eax
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.00473163
leave
ret