joyce8/EMBER2024-capa huggingface dataset:
Function at 0x101d3480
Capabilities:
Enumerate pe sections

Disassembly:
sub esp, 0x14
xorps xmm0, xmm0
push ebx
push ebp
mov ebp, dword [esp + 0x20]
lea ebx, [ebp + 0x318]
movups xmmword [ebx], xmm0
push esi
movq qword [ebx + 0x10], xmm0
movzx ecx, word [ebp + 0x98]
mov eax, dword [ebp + 0x9c]
shl ecx, 4
add ecx, eax
push edi
cmp eax, ecx
jae 0x101d366d
cmp dword [eax], 0x42444620
jne 0x101d34c5
mov esi, dword [eax + 0xc]
test esi, esi
jne 0x101d34d9
add eax, 0x10
cmp eax, ecx
jb 0x101d34b6
pop edi
pop esi
pop ebp
mov eax, 8
pop ebx
add esp, 0x14
ret
push dword [eax + 8]
mov edi, dword [esp + 0x30]
push edi
call fcn.1018bd10
add esp, 8
test eax, eax
jne 0x101d366d
cmp esi, 8
jb 0x101d366d
push ebx
push esi
push edi
call fcn.1018b420
add esp, 0xc
mov dword [esp + 0x20], eax
test eax, eax
jne 0x101d366d
mov eax, dword [ebx]
lea ecx, [eax + esi]
mov dword [ebp + 0x31c], ecx
mov ecx, eax
movzx edi, byte [ecx + 2]
movzx eax, byte [ecx + 3]
movzx edx, byte [ecx + 5]
shl edi, 8
or edi, eax
movzx eax, byte [ecx + 4]
shl eax, 8
or edx, eax
movzx eax, byte [ecx + 6]
shl edx, 8
or edx, eax
movzx eax, byte [ecx + 7]
movzx ecx, byte [ecx + 1]
shl edx, 8
or edx, eax
mov eax, dword [ebx]
movzx eax, byte [eax]
shl eax, 8
or ecx, eax
cmp ecx, 1
jne 0x101d3655
cmp edx, 8
jb 0x101d3655
lea eax, [edx - 8]
shr eax, 2
cmp eax, edi
jb 0x101d3655
lea eax, [edx + 1]
cmp eax, esi
ja 0x101d3655
mov eax, dword [ebx]
sub esi, edx
mov dword [esp + 0x14], 0
mov dword [esp + 0x18], 0
mov dword [ebp + 0x328], edi
mov dword [ebp + 0x324], esi
lea ecx, [eax + edx]
mov dword [ebp + 0x320], ecx
lea edx, [eax + 8]
lea eax, [edx + edi*4]
mov dword [esp + 0x10], eax
cmp edi, 2
jb 0x101d3611
lea esi, [edi - 2]
xor ebx, ebx
shr esi, 1
inc esi
xor ebp, ebp
movzx ecx, byte [edx + 2]
sub edi, 2
movzx eax, byte [edx + 3]
shl ecx, 8
or ecx, eax
lea eax, [ecx + ecx*4]
movzx ecx, byte [edx + 6]
lea ebx, [ebx + eax*2]
shl ecx, 8
movzx eax, byte [edx + 7]
add edx, 8
or ecx, eax
lea eax, [ecx + ecx*4]
lea ebp, [ebp + eax*2]
sub esi, 1
jne 0x101d35c5
mov dword [esp + 0x18], ebp
mov ebp, dword [esp + 0x28]
mov dword [esp + 0x14], ebx
mov esi, dword [ebp + 0x320]
lea ebx, [ebp + 0x318]
jmp 0x101d3613
mov esi, ecx
test edi, edi
je 0x101d3630
movzx ecx, byte [edx + 2]
movzx eax, byte [edx + 3]
mov edx, dword [esp + 0x10]
shl ecx, 8
or ecx, eax
lea eax, [ecx + ecx*4]
lea edx, [edx + eax*2]
jmp 0x101d3634
mov edx, dword [esp + 0x10]
mov eax, dword [esp + 0x14]
add eax, dword [esp + 0x18]
add eax, edx
cmp eax, esi
ja 0x101d3655
mov eax, dword [esp + 0x20]
pop edi
pop esi
mov byte [ebp + 0x32c], 1
pop ebp
pop ebx
add esp, 0x14
ret
push ebx
push dword [esp + 0x30]
call fcn.1018bcd0
xorps xmm0, xmm0
add esp, 8
movups xmmword [ebx], xmm0
movq qword [ebx + 0x10], xmm0
mov eax, 8
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x14
ret
Function at 0x101df710
Capabilities:
Enumerate pe sections
Resolve function by parsing pe exports

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x10231296
mov eax, dword fs:[0]
push eax
push ecx
push ebx
push esi
push edi
mov eax, dword [0x102d2084]
xor eax, ebp
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov esi, ecx
mov dword [ebp - 0x10], esi
mov ebx, dword [ebp + 8]
lea edi, [esi + 0x2c]
mov dword [ebp + 8], edi
mov eax, dword [ebx]
mov dword [esi], eax
movzx eax, byte [ebx + 4]
mov byte [esi + 4], al
movzx eax, byte [ebx + 5]
mov byte [esi + 5], al
movzx eax, byte [ebx + 6]
mov byte [esi + 6], al
movzx eax, byte [ebx + 7]
mov byte [esi + 7], al
movzx eax, byte [ebx + 8]
mov byte [esi + 8], al
movzx eax, byte [ebx + 9]
mov byte [esi + 9], al
mov eax, dword [ebx + 0x10]
mov ecx, dword [ebx + 0x14]
mov dword [esi + 0x10], eax
mov dword [esi + 0x14], ecx
mov eax, dword [ebx + 0x18]
mov ecx, dword [ebx + 0x1c]
mov dword [esi + 0x18], eax
mov dword [esi + 0x1c], ecx
mov eax, dword [ebx + 0x20]
mov ecx, dword [ebx + 0x24]
mov dword [esi + 0x20], eax
mov dword [esi + 0x24], ecx
movzx eax, byte [ebx + 0x28]
mov byte [esi + 0x28], al
movzx eax, byte [ebx + 0x29]
mov byte [esi + 0x29], al
movzx eax, byte [ebx + 0x2a]
mov byte [esi + 0x2a], al
mov dword [edi], 0
mov dword [edi + 4], 0
mov dword [edi + 8], 0
mov eax, dword [ebx + 0x30]
sub eax, dword [ebx + 0x2c]
je 0x101df7fb
cmp eax, 0x7fffffff
ja 0x101df8b1
push eax
mov ecx, edi
call fcn.101e0060
mov esi, dword [ebx + 0x30]
mov eax, dword [ebx + 0x2c]
sub esi, eax
mov edi, dword [edi]
push esi
push eax
push edi
call fcn.101f27e0
mov ecx, dword [ebp + 8]
lea eax, [esi + edi]
mov esi, dword [ebp - 0x10]
add esp, 0xc
mov dword [ecx + 4], eax
lea eax, [esi + 0x38]
mov dword [ebp - 4], 0
mov dword [eax], 0
mov dword [eax + 4], 0
mov dword [eax + 8], 0
mov edi, dword [ebx + 0x3c]
sub edi, dword [ebx + 0x38]
sar edi, 2
mov dword [ebp + 8], eax
test edi, edi
je 0x101df86f
cmp edi, 0x3fffffff
ja 0x101df8b6
push edi
mov ecx, eax
call fcn.101e0230
mov ecx, dword [ebp + 8]
mov dword [ecx], eax
mov dword [ecx + 4], eax
lea eax, [eax + edi*4]
mov dword [ecx + 8], eax
mov esi, dword [ebx + 0x3c]
mov eax, dword [ebx + 0x38]
sub esi, eax
mov edi, dword [ecx]
push esi
push eax
push edi
call fcn.101f27e0
mov ecx, dword [ebp + 8]
add esp, 0xc
sar esi, 2
lea eax, [edi + esi*4]
mov esi, dword [ebp - 0x10]
mov dword [ecx + 4], eax
lea eax, [ebx + 0x44]
mov byte [ebp - 4], 1
lea ecx, [esi + 0x44]
push eax
call fcn.10044a10
lea eax, [ebx + 0x5c]
mov byte [ebp - 4], 2
push eax
lea ecx, [esi + 0x5c]
call fcn.10044a10
mov eax, dword [ebx + 0x74]
mov dword [esi + 0x74], eax
mov eax, dword [ebx + 0x78]
mov dword [esi + 0x78], eax
mov eax, esi
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 4
call fcn.1002b080
call fcn.1002b080
int3
Function at 0x101dfd80
Capabilities:
Enumerate pe sections

Disassembly:
push ebp
mov ebp, esp
push esi
mov esi, ecx
push edi
mov edi, dword [ebp + 8]
mov eax, dword [edi]
mov dword [esi], eax
movzx eax, byte [edi + 4]
mov byte [esi + 4], al
movzx eax, byte [edi + 5]
mov byte [esi + 5], al
movzx eax, byte [edi + 6]
mov byte [esi + 6], al
movzx eax, byte [edi + 7]
mov byte [esi + 7], al
movzx eax, byte [edi + 8]
mov byte [esi + 8], al
movzx eax, byte [edi + 9]
mov byte [esi + 9], al
mov eax, dword [edi + 0x10]
mov ecx, dword [edi + 0x14]
mov dword [esi + 0x10], eax
mov dword [esi + 0x14], ecx
mov eax, dword [edi + 0x18]
mov ecx, dword [edi + 0x1c]
mov dword [esi + 0x18], eax
mov dword [esi + 0x1c], ecx
mov eax, dword [edi + 0x20]
mov ecx, dword [edi + 0x24]
mov dword [esi + 0x20], eax
mov dword [esi + 0x24], ecx
lea ecx, [esi + 0x2c]
movzx eax, byte [edi + 0x28]
mov byte [esi + 0x28], al
movzx eax, byte [edi + 0x29]
mov byte [esi + 0x29], al
movzx eax, byte [edi + 0x2a]
mov byte [esi + 0x2a], al
lea eax, [edi + 0x2c]
push eax
call fcn.101dfc20
lea eax, [edi + 0x38]
lea ecx, [esi + 0x38]
cmp ecx, eax
je 0x101dfe18
mov edx, dword [eax]
mov eax, dword [eax + 4]
sub eax, edx
sar eax, 2
push eax
push edx
call fcn.101de7a0
lea eax, [edi + 0x44]
lea ecx, [esi + 0x44]
cmp ecx, eax
je 0x101dfe34
cmp dword [eax + 0x14], 0x10
mov edx, dword [eax + 0x10]
jb 0x101dfe2d
mov eax, dword [eax]
push edx
push eax
call fcn.10045fd0
lea eax, [edi + 0x5c]
lea ecx, [esi + 0x5c]
cmp ecx, eax
je 0x101dfe50
cmp dword [eax + 0x14], 0x10
mov edx, dword [eax + 0x10]
jb 0x101dfe49
mov eax, dword [eax]
push edx
push eax
call fcn.10045fd0
mov eax, dword [edi + 0x74]
mov dword [esi + 0x74], eax
mov eax, dword [edi + 0x78]
mov dword [esi + 0x78], eax
mov eax, esi
pop edi
pop esi
pop ebp
ret 4
Function at 0x101e39f0
Capabilities:
Resolve function by parsing pe exports

Disassembly:
push ebp
mov ebp, esp
push esi
mov esi, dword [ebp + 8]
xorps xmm0, xmm0
push edi
mov edi, ecx
mov eax, dword [esi]
mov dword [edi], eax
movzx eax, byte [esi + 4]
mov byte [edi + 4], al
movzx eax, byte [esi + 5]
mov byte [edi + 5], al
movzx eax, byte [esi + 6]
mov byte [edi + 6], al
movzx eax, byte [esi + 7]
mov byte [edi + 7], al
movzx eax, byte [esi + 8]
mov byte [edi + 8], al
movzx eax, byte [esi + 9]
mov byte [edi + 9], al
mov eax, dword [esi + 0x10]
mov ecx, dword [esi + 0x14]
mov dword [edi + 0x10], eax
mov dword [edi + 0x14], ecx
mov eax, dword [esi + 0x18]
mov ecx, dword [esi + 0x1c]
mov dword [edi + 0x18], eax
mov dword [edi + 0x1c], ecx
mov eax, dword [esi + 0x20]
mov ecx, dword [esi + 0x24]
mov dword [edi + 0x20], eax
mov dword [edi + 0x24], ecx
movzx eax, byte [esi + 0x28]
mov byte [edi + 0x28], al
movzx eax, byte [esi + 0x29]
mov byte [edi + 0x29], al
movzx eax, byte [esi + 0x2a]
mov byte [edi + 0x2a], al
mov edx, dword [esi + 0x34]
mov ecx, dword [esi + 0x30]
mov eax, dword [esi + 0x2c]
mov dword [esi + 0x34], 0
mov dword [esi + 0x30], 0
mov dword [esi + 0x2c], 0
mov dword [edi + 0x2c], eax
mov dword [edi + 0x30], ecx
mov dword [edi + 0x34], edx
mov eax, dword [esi + 0x38]
mov edx, dword [esi + 0x40]
mov ecx, dword [esi + 0x3c]
mov dword [esi + 0x40], 0
mov dword [esi + 0x3c], 0
mov dword [esi + 0x38], 0
mov dword [edi + 0x38], eax
mov dword [edi + 0x3c], ecx
mov dword [edi + 0x40], edx
movups xmmword [edi + 0x44], xmm0
mov dword [edi + 0x54], 0
mov dword [edi + 0x58], 0
movups xmm0, xmmword [esi + 0x44]
movups xmmword [edi + 0x44], xmm0
movq xmm0, qword [esi + 0x54]
movq qword [edi + 0x54], xmm0
xorps xmm0, xmm0
mov dword [esi + 0x54], 0
mov dword [esi + 0x58], 0xf
mov byte [esi + 0x44], 0
movups xmmword [edi + 0x5c], xmm0
mov dword [edi + 0x6c], 0
mov dword [edi + 0x70], 0
movups xmm0, xmmword [esi + 0x5c]
movups xmmword [edi + 0x5c], xmm0
movq xmm0, qword [esi + 0x6c]
movq qword [edi + 0x6c], xmm0
mov dword [esi + 0x6c], 0
mov dword [esi + 0x70], 0xf
mov byte [esi + 0x5c], 0
mov eax, dword [esi + 0x74]
mov dword [edi + 0x74], eax
mov eax, dword [esi + 0x78]
mov dword [edi + 0x78], eax
mov eax, edi
pop edi
pop esi
pop ebp
ret 4
Function at 0x101e8c00
Capabilities:
Inspect section memory permissions

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xc
push ebx
push esi
mov esi, dword [ebp + 0x10]
push edi
mov edi, dword [ebp + 0xc]
mov al, byte [esi + 0xc]
lea edx, [edi + 0x430]
mov dword [ebp - 0xc], edx
test al, 3
je 0x101e8c3a
movzx eax, al
and eax, 3
mov ecx, dword [eax*8 + 0x10255fb0]
or dword [edx], ecx
mov eax, dword [eax*8 + 0x10255fb4]
or dword [edx + 4], eax
jmp 0x101e8c3d
mov dword [ebp - 0xc], edx
mov al, byte [esi + 0xc]
test al, 0xc
je 0x101e8c60
movzx ecx, al
shr ecx, 2
and ecx, 3
mov eax, dword [ecx*8 + 0x10255fd0]
or dword [edx], eax
mov eax, dword [ecx*8 + 0x10255fd4]
or dword [edx + 4], eax
mov al, byte [esi + 0xc]
test al, 0x30
je 0x101e8c83
movzx ecx, al
shr ecx, 4
and ecx, 3
mov eax, dword [ecx*8 + 0x10255ff0]
or dword [edx], eax
mov eax, dword [ecx*8 + 0x10255ff4]
or dword [edx + 4], eax
mov eax, dword [edi + 0xc]
jmp dword [eax*4 + 0x101e9004]

Function at 0x101efe25
Capabilities:
Get geographical location

Disassembly:
push ebp
mov ebp, esp
push ecx
push esi
push 2
lea eax, [ebp - 4]
push eax
push 0x20000001
push str._x_sys_default_locale
call dword [sym.imp.KERNEL32.dll_GetLocaleInfoEx]
mov esi, dword [ebp + 0xc]
neg eax
sbb eax, eax
xor ecx, ecx
and eax, dword [ebp - 4]
push ecx
push ecx
push esi
push eax
push dword [ebp + 8]
mov dword [ebp - 4], eax
push ecx
push 0x1300
call dword [sym.imp.KERNEL32.dll_FormatMessageA]
push eax
push dword [esi]
call fcn.101efe01
pop esi
leave
ret 8

Function at 0x101fcc03
Capabilities:
Parse pe header

Disassembly:
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleHandleW]
test eax, eax
je 0x101fcc42
mov ecx, 0x5a4d
cmp word [eax], cx
jne 0x101fcc42
mov ecx, dword [eax + 0x3c]
add ecx, eax
cmp dword [ecx], 0x4550
jne 0x101fcc42
mov eax, 0x10b
cmp word [ecx + 0x18], ax
jne 0x101fcc42
cmp dword [ecx + 0x74], 0xe
jbe 0x101fcc42
cmp dword [ecx + 0xe8], 0
setne al
ret
xor al, al
ret
Function at 0x101fd1c8
Capabilities:
Read file on windows

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
mov eax, 0x101c
call fcn.101f1200
mov eax, dword [0x102d2084]
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.1020a8f4
pop ecx
mov ecx, dword [ebp + 8]
mov ebx, eax
cmp dword [ecx + 8], 0
jne 0x101fd20a
mov eax, dword [ebp + 0xc]
mov edx, dword [ebp + 0x10]
jmp 0x101fd366
mov eax, dword [ecx]
sub eax, dword [ecx + 4]
push esi
push edi
push 0
cdq
push 2
push edx
push eax
call fcn.1021b760
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 + 0x1036f228]
push dword [eax + edi + 0x24]
push dword [eax + edi + 0x20]
push ebx
call fcn.1020e7c4
mov ecx, dword [esi*4 + 0x1036f228]
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 0x101fd35f
cmp eax, dword [ecx + edi + 0x24]
jne 0x101fd35f
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 0x101fd35f
push dword [ebp - 0x100c]
push 0
push dword [ebp + 0x10]
push dword [ebp + 0xc]
push ebx
call fcn.1020e7c4
add esp, 0x14
test edx, edx
jl 0x101fd35f
jg 0x101fd2d5
test eax, eax
jb 0x101fd35f
mov ebx, dword [ebp - 0x1018]
mov eax, dword [ebp - 0x1014]
test ebx, ebx
jg 0x101fd35f
jl 0x101fd2ef
cmp dword [ebp - 0x1008], eax
ja 0x101fd35f
lea edi, [ebp - 0x1004]
xor edx, edx
add edi, eax
lea ecx, [ebp - 0x1004]
xor esi, esi
cmp dword [ebp - 0x1008], edx
jne 0x101fd30d
test ebx, ebx
je 0x101fd346
cmp ecx, edi
jae 0x101fd346
mov al, byte [ecx]
cmp al, 0xd
jne 0x101fd327
lea eax, [edi - 1]
cmp ecx, eax
jae 0x101fd333
cmp byte [ecx + 1], 0xa
jne 0x101fd333
inc ecx
jmp 0x101fd333
movzx eax, al
movsx eax, byte [eax + 0x102d2308]
add ecx, eax
add esi, 1
adc edx, 0
inc ecx
cmp esi, dword [ebp - 0x1008]
jne 0x101fd30d
cmp edx, ebx
jne 0x101fd30d
lea eax, [ebp - 0x1004]
sub ecx, eax
mov eax, ecx
cdq
add eax, dword [ebp - 0x1010]
adc edx, dword [ebp - 0x101c]
jmp 0x101fd364
or edx, 0xffffffff
mov eax, edx
pop edi
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
pop ebx
call fcn.101f065f
leave
ret
Function at 0x1020d453
Capabilities:
Allocate thread local storage

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
push esi
push 0x102ac214
push 0x102ac20c
push str.FlsAlloc
push 0x1f
call fcn.1020d27e
mov esi, eax
add esp, 0x10
test esi, esi
je 0x1020d487
push dword [ebp + 8]
mov ecx, esi
call dword [0x10235274]
call esi
jmp 0x1020d48d
call dword [sym.imp.KERNEL32.dll_TlsAlloc]
pop esi
pop ebp
ret 4

Function at 0x1020d4d1
Capabilities:
Get thread local storage value

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
push esi
push 0x102ac224
push 0x102ac21c
push str.FlsGetValue
push 0x21
call fcn.1020d27e
mov esi, eax
add esp, 0x10
test esi, esi
je 0x1020d508
push dword [ebp + 8]
mov ecx, esi
call dword [0x10235274]
call esi
pop esi
pop ebp
ret 4
pop esi
pop ebp
jmp dword [sym.imp.KERNEL32.dll_TlsGetValue]

Function at 0x1020d510
Capabilities:
Set thread local storage value

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
push esi
push 0x102ac22c
push 0x102ac224
push str.FlsSetValue
push 0x22
call fcn.1020d27e
mov esi, eax
add esp, 0x10
test esi, esi
je 0x1020d54a
push dword [ebp + 0xc]
mov ecx, esi
push dword [ebp + 8]
call dword [0x10235274]
call esi
pop esi
pop ebp
ret 8
pop esi
pop ebp
jmp dword [sym.imp.KERNEL32.dll_TlsSetValue]
Function at 0x1020dc5c
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 + 0x1036f228]
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 0x1020dc9c
cmp byte [ebx], 0xa
jne 0x1020dc9c
or byte [edi + eax + 0x28], 4
jmp 0x1020dca1
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 0x1020dda0
mov dl, byte [eax]
cmp dl, 0x1a
je 0x1020dd83
inc eax
cmp dl, 0xd
je 0x1020dccd
mov dword [ebp - 8], eax
mov byte [esi], dl
jmp 0x1020dcf3
cmp eax, ecx
jae 0x1020dd01
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 0x1020dcb5
jmp 0x1020dda0
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 0x1020dd7e
cmp dword [ebp - 0x10], 0
je 0x1020dd7e
mov ecx, dword [ebp - 0xc]
mov eax, dword [ecx*4 + 0x1036f228]
test byte [eax + edi + 0x28], 0x48
je 0x1020dd58
mov dl, byte [ebp - 1]
lea eax, [esi + 1]
mov dword [ebp - 0x14], eax
cmp dl, 0xa
jne 0x1020dd43
mov byte [esi], dl
jmp 0x1020dd54
mov byte [esi], 0xd
mov eax, dword [ecx*4 + 0x1036f228]
mov byte [eax + edi + 0x2a], dl
mov eax, dword [ebp - 0x14]
mov esi, eax
jmp 0x1020dda0
cmp byte [ebp - 1], 0xa
jne 0x1020dd67
cmp esi, ebx
jne 0x1020dd67
mov byte [esi], 0xa
jmp 0x1020dd9f
push 1
push 0xffffffffffffffff
push 0xffffffffffffffff
push dword [ebp + 8]
call fcn.1020e7e2
add esp, 0x10
cmp byte [ebp - 1], 0xa
je 0x1020dda0
mov byte [esi], 0xd
jmp 0x1020dd9f
mov ecx, dword [ebp - 0xc]
mov ecx, dword [ecx*4 + 0x1036f228]
mov al, byte [ecx + edi + 0x28]
test al, 0x40
jne 0x1020dd9d
or al, 2
mov byte [ecx + edi + 0x28], al
jmp 0x1020dda0
mov byte [esi], dl
inc esi
sub esi, ebx
pop edi
mov eax, esi
pop esi
pop ebx
leave
ret
Function at 0x1020dda9
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 + 0x1036f228]
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 0x1020ddef
cmp word [ebx], dx
jne 0x1020ddef
or byte [eax + edi + 0x28], 4
jmp 0x1020ddf4
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 0x1020df57
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 0x1020df37
add eax, 2
cmp cx, word [ebp - 0x10]
je 0x1020de35
mov dword [ebp - 4], eax
mov word [esi], cx
jmp 0x1020de6b
cmp eax, edx
jae 0x1020de79
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 0x1020de10
jmp 0x1020df57
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 0x1020df32
cmp dword [ebp - 0x18], 0
je 0x1020df32
mov edx, dword [ebp - 8]
push 0xa
mov eax, dword [edx*4 + 0x1036f228]
test byte [eax + edi + 0x28], 0x48
je 0x1020df08
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 0x1020decc
mov word [esi], cx
jmp 0x1020df03
push 0xd
pop ecx
mov word [esi], cx
movzx ecx, ax
mov eax, dword [edx*4 + 0x1036f228]
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 + 0x1036f228]
mov byte [eax + edi + 0x2b], cl
mov eax, dword [edx*4 + 0x1036f228]
pop ecx
mov byte [eax + edi + 0x2c], cl
mov esi, dword [ebp - 0x1c]
jmp 0x1020df57
pop eax
cmp word [ebp - 4], ax
jne 0x1020df18
cmp esi, ebx
jne 0x1020df18
mov word [esi], ax
jmp 0x1020df54
push 1
push 0xffffffffffffffff
push 0xfffffffffffffffe
push dword [ebp + 8]
call fcn.1020e7e2
add esp, 0x10
push 0xa
pop eax
cmp word [ebp - 4], ax
je 0x1020df57
push 0xd
pop eax
jmp 0x1020df13
mov edx, dword [ebp - 8]
mov edx, dword [edx*4 + 0x1036f228]
mov al, byte [edx + edi + 0x28]
test al, 0x40
jne 0x1020df51
or al, 2
mov byte [edx + edi + 0x28], al
jmp 0x1020df57
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 0x1021286c
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 0x10212909
push ebx
push esi
call fcn.10212835
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.1020fa8f
add esp, 0x24
mov dword [ebp - 4], eax
test eax, eax
jne 0x102128b6
push esi
call dword [sym.imp.KERNEL32.dll_FreeEnvironmentStringsW]
xor eax, eax
jmp 0x10212908
push edi
push eax
call fcn.1020bdcb
mov edi, eax
pop ecx
push ebx
test edi, edi
jne 0x102128d6
call fcn.1020b9e7
pop ecx
push esi
call dword [sym.imp.KERNEL32.dll_FreeEnvironmentStringsW]
xor eax, eax
jmp 0x10212907
push ebx
push dword [ebp - 4]
push edi
push dword [ebp - 8]
push esi
push ebx
push ebx
call fcn.1020fa8f
add esp, 0x20
test eax, eax
jne 0x102128f5
push edi
call fcn.1020b9e7
jmp 0x102128fd
push ebx
call fcn.1020b9e7
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 0x1021290c
Capabilities:
Query environment variable

Disassembly:
mov edi, edi
push esi
call dword [sym.imp.KERNEL32.dll_GetEnvironmentStringsW]
mov esi, eax
test esi, esi
jne 0x1021291d
pop esi
ret
push ebx
push edi
push esi
call fcn.10212835
mov ebx, eax
sub ebx, esi
and ebx, 0xfffffffe
push ebx
call fcn.1020bdcb
mov edi, eax
pop ecx
pop ecx
test edi, edi
je 0x10212945
push ebx
push esi
push edi
call fcn.101f27e0
add esp, 0xc
push 0
call fcn.1020b9e7
pop ecx
push esi
call dword [sym.imp.KERNEL32.dll_FreeEnvironmentStringsW]
mov eax, edi
pop edi
pop ebx
pop esi
ret

Function at 0x10212d15
Capabilities:
Set environment variable

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

Function at 0x102153d9
Capabilities:
Get geographical location

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
push ecx
push esi
push edi
call fcn.10208f33
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 0x10215448
cmp esi, dword [ebp - 4]
je 0x10215443
cmp dword [ebp + 0xc], 0
je 0x10215443
mov esi, dword [edi + 0x50]
lea ecx, [esi + 2]
mov ax, word [esi]
add esi, 2
test ax, ax
jne 0x10215420
push dword [edi + 0x50]
sub esi, ecx
sar esi, 1
call fcn.10214f2b
pop ecx
xor ecx, ecx
cmp eax, esi
setne cl
mov eax, ecx
jmp 0x1021544a
xor eax, eax
inc eax
jmp 0x1021544a
xor eax, eax
pop edi
pop esi
leave
ret