joyce8/EMBER2024-capa huggingface dataset:
Function at 0x1000a9c0
Capabilities:
Encode data using xor
Hash data using fnv

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x18
push ebx
mov ebx, ecx
mov eax, 0x1fffffff
bsr ecx, eax
push esi
mov esi, 1
mov dword [ebp - 0xc], ebx
mov eax, esi
shl eax, cl
mov ecx, dword [ebp + 8]
push edi
cmp ecx, eax
ja 0x1000ab3a
lea eax, [ecx - 1]
or eax, esi
bsr ecx, eax
mov eax, dword [ebx + 4]
push eax
mov dword [ebp - 8], eax
lea ecx, [ecx + 1]
shl esi, cl
lea ecx, [ebx + 0xc]
lea eax, [esi + esi]
push eax
call fcn.1000a8c0
lea eax, [esi - 1]
mov dword [ebx + 0x1c], esi
mov esi, dword [ebx + 4]
mov dword [ebx + 0x18], eax
mov eax, dword [ebp - 8]
mov esi, dword [esi]
mov edi, esi
cmp esi, eax
je 0x1000ab06
cmp dword [esi + 0x1c], 0xf
lea ecx, [esi + 8]
mov edi, dword [edi]
mov dword [ebp - 0x14], edi
mov dword [ebp - 4], ecx
jbe 0x1000aa3b
mov edx, dword [ecx]
mov dword [ebp - 4], edx
mov ecx, dword [ecx + 0x10]
xor edx, edx
mov dword [ebp - 0x10], ecx
mov ebx, 0x811c9dc5
test ecx, ecx
je 0x1000aa68
mov eax, dword [ebp - 4]
mov edi, ecx
movzx ecx, byte [eax + edx]
inc edx
xor ecx, ebx
imul ebx, ecx, 0x1000193
cmp edx, edi
jb 0x1000aa51
mov edi, dword [ebp - 0x14]
mov eax, dword [ebp - 8]
mov ecx, dword [ebp - 0xc]
mov edx, dword [ecx + 0x18]
mov ecx, dword [ecx + 0xc]
and edx, ebx
lea ecx, [ecx + edx*8]
mov dword [ebp - 4], ecx
cmp dword [ecx], eax
jne 0x1000aa84
mov dword [ecx], esi
mov dword [ecx + 4], esi
jmp 0x1000aafc
mov ebx, dword [ecx + 4]
lea ecx, [esi + 8]
lea edx, [ebx + 8]
call fcn.1000b900
test al, al
je 0x1000aabc
mov ebx, dword [ebx]
cmp ebx, esi
je 0x1000aab4
mov edx, dword [esi + 4]
mov dword [edx], edi
mov ecx, dword [edi + 4]
mov dword [ecx], ebx
mov eax, dword [ebx + 4]
mov dword [eax], esi
mov dword [ebx + 4], ecx
mov dword [edi + 4], edx
mov dword [esi + 4], eax
mov eax, dword [ebp - 4]
mov dword [eax + 4], esi
jmp 0x1000aaf9
mov eax, dword [ebp - 4]
cmp dword [eax], ebx
je 0x1000aadc
mov ebx, dword [ebx + 4]
lea ecx, [esi + 8]
lea edx, [ebx + 8]
call fcn.1000b900
test al, al
jne 0x1000ab1e
mov eax, dword [ebp - 4]
cmp dword [eax], ebx
jne 0x1000aac3
mov edx, dword [esi + 4]
mov dword [edx], edi
mov ecx, dword [edi + 4]
mov dword [ecx], ebx
mov eax, dword [ebx + 4]
mov dword [eax], esi
mov dword [ebx + 4], ecx
mov dword [edi + 4], edx
mov dword [esi + 4], eax
mov eax, dword [ebp - 4]
mov dword [eax], esi
mov eax, dword [ebp - 8]
mov esi, edi
cmp edi, eax
jne 0x1000aa25
lea ecx, [ebp - 0xc]
mov dword [ebp - 0xc], 0
call fcn.1000a5b0
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 4
mov edx, dword [esi + 4]
mov ebx, dword [ebx]
mov dword [edx], edi
mov ecx, dword [edi + 4]
mov dword [ecx], ebx
mov eax, dword [ebx + 4]
mov dword [eax], esi
mov dword [ebx + 4], ecx
mov dword [edi + 4], edx
mov dword [esi + 4], eax
jmp 0x1000aaf9
push str.invalid_hash_bucket_count
call fcn.1000f9fb
int3
Function at 0x1000ab50
Capabilities:
Encode data using xor
Hash data using fnv

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x1c
mov eax, dword [ebp + 0xc]
mov edx, dword [ebp + 8]
mov dword [ebp - 0xc], ecx
cmp edx, eax
je 0x1000acc3
cmp dword [edx + 0x1c], 0xf
mov eax, dword [ecx + 4]
mov dword [ebp - 0x1c], eax
mov eax, dword [ecx + 0xc]
push ebx
mov dword [ebp - 0x18], eax
lea ebx, [edx + 8]
mov eax, dword [edx + 4]
push esi
mov dword [ebp - 0x10], eax
mov esi, edx
jbe 0x1000ab89
mov ebx, dword [edx + 8]
mov eax, dword [edx + 0x18]
xor edx, edx
push edi
mov edi, 0x811c9dc5
test eax, eax
je 0x1000abb4
mov ecx, eax
nop word [eax + eax]
movzx eax, byte [ebx + edx]
inc edx
xor eax, edi
imul edi, eax, 0x1000193
cmp edx, ecx
jb 0x1000aba0
mov ecx, dword [ebp - 0xc]
mov eax, dword [ecx + 0x18]
mov ecx, dword [ebp - 0x18]
and eax, edi
lea eax, [ecx + eax*8]
mov ecx, dword [eax]
mov dword [ebp - 0x14], eax
mov eax, dword [eax + 4]
mov dword [ebp - 4], ecx
mov dword [ebp - 8], eax
nop dword [eax]
mov edi, esi
mov ebx, esi
mov esi, dword [esi]
lea ecx, [edi + 8]
call fcn.1000be60
push 0x38
push edi
call fcn.10026818
mov edi, dword [ebp - 0xc]
add esp, 8
dec dword [edi + 8]
cmp ebx, dword [ebp - 8]
je 0x1000ac1d
mov eax, dword [ebp + 0xc]
cmp esi, eax
jne 0x1000abd0
mov ecx, dword [ebp - 4]
cmp ecx, dword [ebp + 8]
jne 0x1000acb8
mov ecx, dword [ebp - 0x14]
pop edi
mov dword [ecx], esi
mov ecx, dword [ebp - 0x10]
mov dword [ecx], esi
mov dword [esi + 4], ecx
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 8
mov ecx, dword [ebp - 4]
cmp ecx, dword [ebp + 8]
mov ecx, dword [ebp - 0x14]
jne 0x1000ac2f
mov eax, dword [ebp - 0x1c]
mov dword [ecx], eax
jmp 0x1000ac32
mov eax, dword [ebp - 0x10]
mov dword [ecx + 4], eax
mov eax, dword [ebp + 0xc]
cmp esi, eax
je 0x1000acb8
nop dword [eax]
cmp dword [esi + 0x1c], 0xf
lea ebx, [esi + 8]
jbe 0x1000ac4c
mov ebx, dword [esi + 8]
mov eax, dword [esi + 0x18]
xor ecx, ecx
mov dword [ebp - 8], eax
mov edx, 0x811c9dc5
test eax, eax
je 0x1000ac74
mov edi, eax
nop
movzx eax, byte [ebx + ecx]
inc ecx
xor eax, edx
imul edx, eax, 0x1000193
cmp ecx, edi
jb 0x1000ac60
mov edi, dword [ebp - 0xc]
mov eax, dword [edi + 0x18]
mov ecx, dword [ebp - 0x18]
and eax, edx
lea eax, [ecx + eax*8]
mov dword [ebp - 4], eax
mov eax, dword [eax + 4]
mov dword [ebp - 8], eax
mov edi, esi
mov ebx, esi
mov esi, dword [esi]
lea ecx, [edi + 8]
call fcn.1000be60
push 0x38
push edi
call fcn.10026818
mov edi, dword [ebp - 0xc]
add esp, 8
mov eax, dword [ebp + 0xc]
dec dword [edi + 8]
cmp ebx, dword [ebp - 8]
je 0x1000acc9
cmp esi, eax
jne 0x1000ac88
mov ecx, dword [ebp - 4]
mov dword [ecx], esi
mov ecx, dword [ebp - 0x10]
pop edi
mov dword [ecx], esi
mov dword [esi + 4], ecx
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 8
mov ecx, dword [ebp - 4]
mov edx, dword [ebp - 0x1c]
mov dword [ecx], edx
mov dword [ecx + 4], edx
cmp esi, eax
jne 0x1000ac40
mov ecx, dword [ebp - 0x10]
pop edi
mov dword [ecx], esi
mov dword [esi + 4], ecx
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 8
Function at 0x1000c050
Capabilities:
Encode data using xor
Hash data using fnv

Disassembly:
push ebp
mov ebp, esp
push esi
mov esi, dword [ebp + 0x10]
xor ecx, ecx
push edi
mov edi, dword [ebp + 0xc]
test esi, esi
je 0x1000c07b
mov edx, dword [ebp + 8]
movzx eax, byte [edi + ecx]
inc ecx
xor eax, edx
imul edx, eax, 0x1000193
cmp ecx, esi
jb 0x1000c064
pop edi
mov eax, edx
pop esi
pop ebp
ret
mov eax, dword [ebp + 8]
pop edi
pop esi
pop ebp
ret

Function at 0x1000cd20
Capabilities:
Enumerate threads
Suspend thread

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x2c
mov eax, dword [0x1005b080]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
mov ebx, dword [ebp + 8]
push edi
push ebx
push 0
push 0x1fffff
mov dword [ebp - 0x28], ebx
call dword [sym.imp.KERNEL32.dll_OpenProcess]
mov edi, eax
mov dword [ebp - 0x2c], edi
test edi, edi
je 0x1000cddf
push esi
push ebx
push 4
mov dword [ebp - 0x20], 0x1c
call dword [sym.imp.KERNEL32.dll_CreateToolhelp32Snapshot]
mov esi, eax
mov dword [ebp - 0x24], esi
cmp esi, 0xffffffff
jne 0x1000cd88
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
pop esi
pop edi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.1002680a
mov esp, ebp
pop ebp
ret 8
lea eax, [ebp - 0x20]
push eax
push esi
call dword [sym.imp.KERNEL32.dll_Thread32First]
mov edi, dword [sym.imp.KERNEL32.dll_CloseHandle]
mov ebx, eax
test ebx, ebx
je 0x1000cdd6
nop
mov eax, dword [ebp - 0x28]
cmp dword [ebp - 0x14], eax
jne 0x1000cdf7
push dword [ebp - 0x18]
push 0
push 2
call dword [sym.imp.KERNEL32.dll_OpenThread]
mov esi, eax
test esi, esi
je 0x1000cdcf
cmp esi, dword [ebp + 0xc]
je 0x1000cdf1
push esi
call dword [sym.imp.KERNEL32.dll_SuspendThread]
cmp eax, 0xffffffff
jne 0x1000cdf1
push esi
call edi
mov esi, dword [ebp - 0x24]
test ebx, ebx
jne 0x1000cda0
push esi
call edi
push dword [ebp - 0x2c]
call edi
pop esi
mov ecx, dword [ebp - 4]
pop edi
xor ecx, ebp
pop ebx
call fcn.1002680a
mov esp, ebp
pop ebp
ret 8
push esi
call edi
mov esi, dword [ebp - 0x24]
lea eax, [ebp - 0x20]
push eax
push esi
call dword [sym.imp.KERNEL32.dll_Thread32Next]
mov ebx, eax
jmp 0x1000cdd2
Function at 0x1000e720
Capabilities:
Parse pe header

Disassembly:
push ebp
mov ebp, esp
push 0xfffffffffffffffe
push 0x10058038
push 0x10028170
mov eax, dword fs:[0]
push eax
sub esp, 0x24
push ebx
push esi
push edi
mov eax, dword [0x1005b080]
xor dword [ebp - 8], eax
xor eax, ebp
push eax
lea eax, [ebp - 0x10]
mov dword fs:[0], eax
mov dword [ebp - 0x18], esp
push 0x1c
lea eax, [ebp - 0x34]
push eax
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_VirtualQuery]
mov dword [ebp - 4], 0
mov eax, 0x5a4d
mov ecx, dword [ebp - 0x30]
cmp word [ecx], ax
jne 0x1000e7d2
mov edx, dword [ecx + 0x3c]
cmp dword [edx + ecx], 0x4550
jne 0x1000e7d2
mov esi, dword [edx + ecx + 0xd8]
lea eax, [esi + ecx]
cmp dword [ebp + 0xc], eax
jb 0x1000e7d2
mov eax, dword [edx + ecx + 0xdc]
add eax, esi
add eax, ecx
cmp dword [ebp + 0xc], eax
jae 0x1000e7d2
mov dword [ebp - 4], 0xfffffffe
mov al, 1
mov ecx, dword [ebp - 0x10]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov dword [ebp - 4], 0xfffffffe
xor al, al
mov ecx, dword [ebp - 0x10]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
Function at 0x1000ec40
Capabilities:
Allocate or change rwx memory
Execute shellcode via indirect call

Disassembly:
push ecx
cmp dword [0x1005ca40], 0
jne 0x1000ecb6
call dword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
mov ecx, eax
mov edx, 0x1005ca40
xor eax, eax
lock cmpxchg dword [edx], ecx
test eax, eax
jne 0x1000ecb6
push esi
mov esi, dword [0x1005ca30]
mov dword [0x1005ca50], eax
mov dword [0x1005ca4c], eax
mov dword [0x1005ca48], eax
push edi
test esi, esi
je 0x1000ec9c
mov edi, dword [sym.imp.KERNEL32.dll_VirtualProtect]
lea eax, [esp + 8]
push eax
push 0x40
push 0x10000
push esi
call edi
test eax, eax
je 0x1000eca7
mov esi, dword [esi + 4]
test esi, esi
jne 0x1000ec82
xor eax, eax
pop edi
mov dword [0x1005ca44], eax
pop esi
pop ecx
ret
call dword [sym.imp.KERNEL32.dll_GetLastError]
pop edi
mov dword [0x1005ca44], eax
pop esi
pop ecx
ret
mov eax, 0x10dd
pop ecx
ret
Function at 0x1000f140
Capabilities:
Suspend thread

Disassembly:
mov eax, dword [0x1005ca44]
test eax, eax
jne 0x1000f1be
push edi
call dword [sym.imp.KERNEL32.dll_GetCurrentThread]
mov edi, dword [esp + 8]
cmp edi, eax
jne 0x1000f15e
xor eax, eax
pop edi
ret 4
push esi
push 8
call fcn.10026826
mov esi, eax
add esp, 4
test esi, esi
jne 0x1000f174
lea edi, [eax + 8]
jmp 0x1000f193
push edi
call dword [sym.imp.KERNEL32.dll_SuspendThread]
cmp eax, 0xffffffff
jne 0x1000f1aa
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov edi, eax
push 8
push esi
call fcn.10026818
add esp, 8
pop esi
mov dword [0x1005ca44], edi
mov eax, edi
mov dword [0x1005ca48], 0
pop edi
ret 4
mov eax, dword [0x1005ca4c]
mov dword [esi + 4], edi
mov dword [esi], eax
xor eax, eax
mov dword [0x1005ca4c], esi
pop esi
pop edi
ret 4

Function at 0x10026176
Capabilities:
Get geographical location

Disassembly:
push ebp
mov ebp, esp
push ecx
call fcn.1002fdce
mov eax, dword [eax + 0x14]
test eax, eax
je 0x100261b9
and dword [ebp - 4], 0
lea ecx, [ebp - 4]
push 2
push ecx
push 0x22
push eax
call dword [sym.imp.KERNEL32.dll_GetLocaleInfoEx]
movzx eax, word [ebp - 4]
sub eax, 0x30
je 0x100261b9
sub eax, 1
je 0x100261b4
sub eax, 1
je 0x100261b0
xor eax, eax
leave
ret
push 3
jmp 0x100261bb
xor eax, eax
inc eax
leave
ret
push 2
pop eax
leave
ret

Function at 0x10036546
Capabilities:
Parse pe header

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

Function at 0x100399a9
Capabilities:
Allocate thread local storage

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
push esi
push 0x10050cb8
push 0x10050cb0
push str.FlsAlloc
push 0x1f
call fcn.10039814
mov esi, eax
add esp, 0x10
test esi, esi
je 0x100399dd
push dword [ebp + 8]
mov ecx, esi
call dword [0x1004c1d0]
call esi
jmp 0x100399e3
call dword [sym.imp.KERNEL32.dll_TlsAlloc]
pop esi
pop ebp
ret 4

Function at 0x10039a27
Capabilities:
Get thread local storage value

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
push esi
push 0x10050cc8
push 0x10050cc0
push str.FlsGetValue
push 0x21
call fcn.10039814
mov esi, eax
add esp, 0x10
test esi, esi
je 0x10039a5e
push dword [ebp + 8]
mov ecx, esi
call dword [0x1004c1d0]
call esi
pop esi
pop ebp
ret 4
pop esi
pop ebp
jmp dword [sym.imp.KERNEL32.dll_TlsGetValue]

Function at 0x10039a66
Capabilities:
Set thread local storage value

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
push esi
push 0x10050cd0
push 0x10050cc8
push str.FlsSetValue
push 0x22
call fcn.10039814
mov esi, eax
add esp, 0x10
test esi, esi
je 0x10039aa0
push dword [ebp + 0xc]
mov ecx, esi
push dword [ebp + 8]
call dword [0x1004c1d0]
call esi
pop esi
pop ebp
ret 8
pop esi
pop ebp
jmp dword [sym.imp.KERNEL32.dll_TlsSetValue]
Function at 0x1003ce80
Capabilities:
Read file on windows

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
mov eax, 0x101c
call fcn.10027960
mov eax, dword [0x1005b080]
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.1003af78
pop ecx
mov ecx, dword [ebp + 8]
mov ebx, eax
cmp dword [ecx + 8], 0
jne 0x1003cec2
mov eax, dword [ebp + 0xc]
mov edx, dword [ebp + 0x10]
jmp 0x1003d01e
mov eax, dword [ecx]
sub eax, dword [ecx + 4]
push esi
push edi
push 0
cdq
push 2
push edx
push eax
call fcn.100493a0
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 + 0x1005d610]
push dword [eax + edi + 0x24]
push dword [eax + edi + 0x20]
push ebx
call fcn.1003ca09
mov ecx, dword [esi*4 + 0x1005d610]
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 0x1003d017
cmp eax, dword [ecx + edi + 0x24]
jne 0x1003d017
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 0x1003d017
push dword [ebp - 0x100c]
push 0
push dword [ebp + 0x10]
push dword [ebp + 0xc]
push ebx
call fcn.1003ca09
add esp, 0x14
test edx, edx
jl 0x1003d017
jg 0x1003cf8d
test eax, eax
jb 0x1003d017
mov ebx, dword [ebp - 0x1018]
mov eax, dword [ebp - 0x1014]
test ebx, ebx
jg 0x1003d017
jl 0x1003cfa7
cmp dword [ebp - 0x1008], eax
ja 0x1003d017
lea edi, [ebp - 0x1004]
xor edx, edx
add edi, eax
lea ecx, [ebp - 0x1004]
xor esi, esi
cmp dword [ebp - 0x1008], edx
jne 0x1003cfc5
test ebx, ebx
je 0x1003cffe
cmp ecx, edi
jae 0x1003cffe
mov al, byte [ecx]
cmp al, 0xd
jne 0x1003cfdf
lea eax, [edi - 1]
cmp ecx, eax
jae 0x1003cfeb
cmp byte [ecx + 1], 0xa
jne 0x1003cfeb
inc ecx
jmp 0x1003cfeb
movzx eax, al
movsx eax, byte [eax + 0x1005b330]
add ecx, eax
add esi, 1
adc edx, 0
inc ecx
cmp esi, dword [ebp - 0x1008]
jne 0x1003cfc5
cmp edx, ebx
jne 0x1003cfc5
lea eax, [ebp - 0x1004]
sub ecx, eax
mov eax, ecx
cdq
add eax, dword [ebp - 0x1010]
adc edx, dword [ebp - 0x101c]
jmp 0x1003d01c
or edx, 0xffffffff
mov eax, edx
pop edi
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
pop ebx
call fcn.1002680a
leave
ret
Function at 0x1003d315
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 + 0x1005d610]
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 0x1003d355
cmp byte [ebx], 0xa
jne 0x1003d355
or byte [edi + eax + 0x28], 4
jmp 0x1003d35a
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 0x1003d459
mov dl, byte [eax]
cmp dl, 0x1a
je 0x1003d43c
inc eax
cmp dl, 0xd
je 0x1003d386
mov dword [ebp - 8], eax
mov byte [esi], dl
jmp 0x1003d3ac
cmp eax, ecx
jae 0x1003d3ba
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 0x1003d36e
jmp 0x1003d459
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 0x1003d437
cmp dword [ebp - 0x10], 0
je 0x1003d437
mov ecx, dword [ebp - 0xc]
mov eax, dword [ecx*4 + 0x1005d610]
test byte [eax + edi + 0x28], 0x48
je 0x1003d411
mov dl, byte [ebp - 1]
lea eax, [esi + 1]
mov dword [ebp - 0x14], eax
cmp dl, 0xa
jne 0x1003d3fc
mov byte [esi], dl
jmp 0x1003d40d
mov byte [esi], 0xd
mov eax, dword [ecx*4 + 0x1005d610]
mov byte [eax + edi + 0x2a], dl
mov eax, dword [ebp - 0x14]
mov esi, eax
jmp 0x1003d459
cmp byte [ebp - 1], 0xa
jne 0x1003d420
cmp esi, ebx
jne 0x1003d420
mov byte [esi], 0xa
jmp 0x1003d458
push 1
push 0xffffffffffffffff
push 0xffffffffffffffff
push dword [ebp + 8]
call fcn.1003ca27
add esp, 0x10
cmp byte [ebp - 1], 0xa
je 0x1003d459
mov byte [esi], 0xd
jmp 0x1003d458
mov ecx, dword [ebp - 0xc]
mov ecx, dword [ecx*4 + 0x1005d610]
mov al, byte [ecx + edi + 0x28]
test al, 0x40
jne 0x1003d456
or al, 2
mov byte [ecx + edi + 0x28], al
jmp 0x1003d459
mov byte [esi], dl
inc esi
sub esi, ebx
pop edi
mov eax, esi
pop esi
pop ebx
leave
ret
Function at 0x1003d462
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 + 0x1005d610]
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 0x1003d4a8
cmp word [ebx], dx
jne 0x1003d4a8
or byte [eax + edi + 0x28], 4
jmp 0x1003d4ad
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 0x1003d610
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 0x1003d5f0
add eax, 2
cmp cx, word [ebp - 0x10]
je 0x1003d4ee
mov dword [ebp - 4], eax
mov word [esi], cx
jmp 0x1003d524
cmp eax, edx
jae 0x1003d532
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 0x1003d4c9
jmp 0x1003d610
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 0x1003d5eb
cmp dword [ebp - 0x18], 0
je 0x1003d5eb
mov edx, dword [ebp - 8]
push 0xa
mov eax, dword [edx*4 + 0x1005d610]
test byte [eax + edi + 0x28], 0x48
je 0x1003d5c1
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 0x1003d585
mov word [esi], cx
jmp 0x1003d5bc
push 0xd
pop ecx
mov word [esi], cx
movzx ecx, ax
mov eax, dword [edx*4 + 0x1005d610]
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 + 0x1005d610]
mov byte [eax + edi + 0x2b], cl
mov eax, dword [edx*4 + 0x1005d610]
pop ecx
mov byte [eax + edi + 0x2c], cl
mov esi, dword [ebp - 0x1c]
jmp 0x1003d610
pop eax
cmp word [ebp - 4], ax
jne 0x1003d5d1
cmp esi, ebx
jne 0x1003d5d1
mov word [esi], ax
jmp 0x1003d60d
push 1
push 0xffffffffffffffff
push 0xfffffffffffffffe
push dword [ebp + 8]
call fcn.1003ca27
add esp, 0x10
push 0xa
pop eax
cmp word [ebp - 4], ax
je 0x1003d610
push 0xd
pop eax
jmp 0x1003d5cc
mov edx, dword [ebp - 8]
mov edx, dword [edx*4 + 0x1005d610]
mov al, byte [edx + edi + 0x28]
test al, 0x40
jne 0x1003d60a
or al, 2
mov byte [edx + edi + 0x28], al
jmp 0x1003d610
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 0x10040b19
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 0x10040bb6
push ebx
push esi
call fcn.10040ae2
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.1003efa9
add esp, 0x24
mov dword [ebp - 4], eax
test eax, eax
jne 0x10040b63
push esi
call dword [sym.imp.KERNEL32.dll_FreeEnvironmentStringsW]
xor eax, eax
jmp 0x10040bb5
push edi
push eax
call fcn.1003a078
mov edi, eax
pop ecx
push ebx
test edi, edi
jne 0x10040b83
call fcn.10039535
pop ecx
push esi
call dword [sym.imp.KERNEL32.dll_FreeEnvironmentStringsW]
xor eax, eax
jmp 0x10040bb4
push ebx
push dword [ebp - 4]
push edi
push dword [ebp - 8]
push esi
push ebx
push ebx
call fcn.1003efa9
add esp, 0x20
test eax, eax
jne 0x10040ba2
push edi
call fcn.10039535
jmp 0x10040baa
push ebx
call fcn.10039535
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 0x10040bb9
Capabilities:
Query environment variable

Disassembly:
mov edi, edi
push esi
call dword [sym.imp.KERNEL32.dll_GetEnvironmentStringsW]
mov esi, eax
test esi, esi
jne 0x10040bca
pop esi
ret
push ebx
push edi
push esi
call fcn.10040ae2
mov ebx, eax
sub ebx, esi
and ebx, 0xfffffffe
push ebx
call fcn.1003a078
mov edi, eax
pop ecx
pop ecx
test edi, edi
je 0x10040bf2
push ebx
push esi
push edi
call fcn.100282d0
add esp, 0xc
push 0
call fcn.10039535
pop ecx
push esi
call dword [sym.imp.KERNEL32.dll_FreeEnvironmentStringsW]
mov eax, edi
pop edi
pop ebx
pop esi
ret

Function at 0x10040fc2
Capabilities:
Set environment variable

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

Function at 0x10043247
Capabilities:
Get geographical location

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
push ecx
push esi
push edi
call fcn.1003775c
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 0x100432b6
cmp esi, dword [ebp - 4]
je 0x100432b1
cmp dword [ebp + 0xc], 0
je 0x100432b1
mov esi, dword [edi + 0x50]
lea ecx, [esi + 2]
mov ax, word [esi]
add esi, 2
test ax, ax
jne 0x1004328e
push dword [edi + 0x50]
sub esi, ecx
sar esi, 1
call fcn.10042d99
pop ecx
xor ecx, ecx
cmp eax, esi
setne cl
mov eax, ecx
jmp 0x100432b8
xor eax, eax
inc eax
jmp 0x100432b8
xor eax, eax
pop edi
pop esi
leave
ret