joyce8/EMBER2024-capa huggingface dataset:
Function at 0x1005cfc0
Capabilities:
Access peb ldr_data

Disassembly:
push ebx
mov ebx, esp
sub esp, 8
and esp, 0xfffffff8
add esp, 4
push ebp
mov ebp, dword [ebx + 4]
mov dword [esp + 4], ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x100a955d
mov eax, dword fs:[0]
push eax
push ebx
sub esp, 0xa8
mov eax, dword [0x100ee940]
xor eax, ebp
mov dword [ebp - 0x14], eax
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
movups xmm0, xmmword [ecx]
mov esi, dword [ebx + 0xc]
movups xmm1, xmmword [edx + 0x10]
mov eax, dword [ebx + 8]
movups xmmword [ebp - 0xb4], xmm0
mov dword [ebp - 0x80], eax
movups xmm0, xmmword [ecx + 0x10]
movups xmmword [ebp - 0x78], xmm1
movups xmmword [ebp - 0xa4], xmm0
movups xmm0, xmmword [ecx + 0x20]
psrldq xmm1, 4
movups xmmword [ebp - 0x94], xmm0
movups xmm0, xmmword [edx + 0x20]
movups xmmword [ebp - 0x68], xmm0
movups xmm0, xmmword [edx + 0x30]
movups xmmword [ebp - 0x58], xmm0
movups xmm0, xmmword [edx + 0x40]
movups xmmword [ebp - 0x48], xmm0
movq xmm0, qword [edx + 0x50]
movq qword [ebp - 0x38], xmm0
movss xmm0, dword [edx + 0xc]
mulss xmm0, dword [esi]
movd esi, xmm1
movss dword [ebp - 0x18], xmm0
mov dword [ebp - 0x7c], esi
cmp esi, 0x3fffffff
ja 0x1005d16c
mov eax, dword [ebp - 0x78]
test eax, eax
je 0x1005d085
mov ecx, eax
jmp 0x1005d0d1
lea eax, [esi*4]
cmp eax, 0x20000
ja 0x1005d0a4
add eax, 0xf
call fcn.100792d0
lea ecx, [esp + 0xf]
and ecx, 0xfffffff0
jmp 0x1005d0d1
add eax, 0x10
mov ecx, 0xffffffff
cmovb eax, ecx
push eax
call fcn.1008a9f1
add esp, 4
test eax, eax
je 0x1005d16c
mov ecx, eax
and ecx, 0xfffffff0
add ecx, 0x10
mov dword [ecx - 4], eax
je 0x1005d16c
mov edx, dword [ebp - 0x7c]
xorps xmm0, xmm0
shl esi, 2
cmp esi, 0x20000
movq qword [ebp - 0x24], xmm0
mov dword [ebp - 0x1c], 0
seta al
mov dword [ebp - 0x20], edx
xor edi, edi
mov byte [ebp - 0x1c], al
cmp dword [ebp - 0x78], edi
cmove edi, ecx
mov dword [ebp - 0x24], edi
lea eax, [ebp - 0x18]
mov dword [ebp - 4], 0
mov edx, dword [ebp - 0xb0]
push eax
mov eax, dword [ebp - 0x80]
push 1
push dword [eax]
push 1
push ecx
mov ecx, dword [ebp - 0xac]
push 3
push dword [ebp - 0xb4]
call fcn.1005af10
add esp, 0x1c
cmp esi, 0x20000
jbe 0x1005d148
test edi, edi
je 0x1005d148
push dword [edi - 4]
call fcn.10089bd6
add esp, 4
lea esp, [ebp - 0xc4]
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
mov ecx, dword [ebp - 0x14]
xor ecx, ebp
call fcn.10078315
mov esp, ebp
pop ebp
mov esp, ebx
pop ebx
ret
call fcn.10002c20
int3
Function at 0x10066500
Capabilities:
Allocate thread local storage

Disassembly:
cmp dword [0x10105528], 0
jne 0x10066637
push pe_nt_image_headers32
push 0
push 0x1010553c
mov dword [0x10105528], 0
call fcn.1007a5e0
push 0x25d4
push 0
push 0x1010567c
call fcn.1007a5e0
movups xmm0, xmmword [0x100ee5b4]
mov eax, dword [0x10108060]
add esp, 0x18
mov ecx, dword [0x1010805c]
mov dword [0x10105530], eax
mov eax, dword [0x10108064]
mov dword [0x10105534], eax
mov eax, dword [0x10108068]
mov dword [0x1010552c], ecx
mov dword [0x10105538], eax
movups xmmword [0x1010565c], xmm0
movups xmm0, xmmword [0x100ee5c4]
movups xmmword [0x1010566c], xmm0
test ecx, ecx
jne 0x100665a4
mov dword [0x1010552c], 0x100664c0
mov dword [0x10105530], 0x100664e0
mov dword [0x10105534], 0x100664d0
push 0x1010553c
push dword [0x100ee5bc]
call fcn.10066900
add esp, 8
test eax, eax
je 0x10066642
call dword [0x10105540]
test eax, eax
je 0x1006663d
push 0x10106a30
call fcn.100667d0
add esp, 4
test eax, eax
je 0x1006663d
push 0x10106a20
call fcn.100667f0
add esp, 4
test eax, eax
je 0x1006663d
push 0x10106a28
call fcn.100667f0
add esp, 4
test eax, eax
je 0x1006663d
push 0x10107c50
push 0x10106a20
call fcn.100668a0
add esp, 8
call fcn.100641d0
call fcn.100668f0
call fcn.100668d0
mov dword [0x10106a50], eax
mov dword [0x10106a54], edx
mov dword [0x10105528], 1
call fcn.10065850
mov eax, 1
ret
call fcn.10066670
xor eax, eax
ret

Function at 0x100667f0
Capabilities:
Allocate thread local storage

Disassembly:
call dword [sym.imp.KERNEL32.dll_TlsAlloc]
mov ecx, dword [esp + 4]
mov dword [ecx + 4], eax
cmp eax, 0xffffffff
jne 0x10066817
push str.Win32:_Failed_to_allocate_TLS_index
push 0x10008
call fcn.10065ec0
add esp, 8
xor eax, eax
ret
mov dword [ecx], 1
mov eax, 1
ret
Function at 0x10067610
Capabilities:
Log keystrokes

Disassembly:
sub esp, 0x164
mov eax, dword [0x100ee940]
xor eax, esp
mov dword [esp + 0x160], eax
push ebx
push ebp
push esi
push edi
push 0x100
lea eax, [esp + 0x74]
push 0
push eax
call fcn.1007a5e0
push 0x6d1
push 0
push 0x1010722a
call fcn.1007a5e0
mov eax, 0x101072ca
lea ebx, [esp + 0x2c]
add esp, 0x18
mov dword [esp + 0x10], eax
mov esi, 0x20
sub ebx, 0x480
movsx edi, word [esi*2 + 0x10106f70]
cmp edi, 0xffffffff
je 0x1006776d
cmp esi, 0x140
jb 0x1006770a
cmp esi, 0x14e
ja 0x1006770a
mov dword [esp + 0x14], 0x60
mov dword [esp + 0x18], 0x61
mov dword [esp + 0x1c], 0x62
mov dword [esp + 0x20], 0x63
mov dword [esp + 0x24], 0x64
mov dword [esp + 0x28], 0x65
mov dword [esp + 0x2c], 0x66
mov dword [esp + 0x30], 0x67
mov dword [esp + 0x34], 0x68
mov dword [esp + 0x38], 0x69
mov dword [esp + 0x3c], 0x6e
mov dword [esp + 0x40], 0x6f
mov dword [esp + 0x44], 0x6a
mov dword [esp + 0x48], 0x6d
mov dword [esp + 0x4c], 0x6b
mov ebp, dword [ebx]
jmp 0x10067715
push 1
push edi
call dword [sym.imp.USER32.dll_MapVirtualKeyW]
mov ebp, eax
push 0
push 0x10
lea eax, [esp + 0x58]
push eax
lea eax, [esp + 0x7c]
push eax
push edi
push ebp
call dword [sym.imp.USER32.dll_ToUnicode]
cmp eax, 0xffffffff
jne 0x10067746
push 0
push 0x10
lea eax, [esp + 0x58]
push eax
lea eax, [esp + 0x7c]
push eax
push edi
push ebp
call dword [sym.imp.USER32.dll_ToUnicode]
cmp eax, 1
jl 0x10067769
push 0
push 0
push 5
push dword [esp + 0x1c]
lea eax, [esp + 0x60]
push 1
push eax
push 0
push 0xfde9
call dword [sym.imp.KERNEL32.dll_WideCharToMultiByte]
mov eax, dword [esp + 0x10]
inc esi
add eax, 5
add ebx, 4
mov dword [esp + 0x10], eax
cmp esi, 0x15c
jle 0x10067665
mov ecx, dword [esp + 0x170]
pop edi
pop esi
pop ebp
pop ebx
xor ecx, esp
call fcn.10078315
add esp, 0x164
ret

Function at 0x1006b130
Capabilities:
Encode data using xor

Disassembly:
push ebx
push ebp
mov ebp, dword [esp + 0xc]
xor ebx, ebx
mov ecx, 0x7fffffff
test ebp, ebp
jle 0x1006b17f
mov edx, dword [esp + 0x14]
imul edx, dword [esp + 0x18]
push esi
push edi
mov edi, dword [esp + 0x18]
mov dword [esp + 0x1c], edx
mov eax, dword [edi + 4]
mov esi, ecx
imul eax, dword [edi]
sub eax, edx
cdq
xor eax, edx
sub eax, edx
mov edx, edi
cmp eax, ecx
cmovl ecx, eax
cmp eax, esi
cmovge edx, ebx
add edi, 0xc
mov ebx, edx
mov edx, dword [esp + 0x1c]
sub ebp, 1
jne 0x1006b154
pop edi
pop esi
pop ebp
mov eax, ebx
pop ebx
ret
Function at 0x1006ba10
Capabilities:
Register raw input devices

Disassembly:
sub esp, 0x14
mov eax, dword [0x100ee940]
xor eax, esp
mov dword [esp + 0x10], eax
push ebx
push edi
mov edi, dword [esp + 0x20]
lea eax, [esp + 8]
push eax
mov dword [0x10107910], edi
call dword [sym.imp.USER32.dll_GetCursorPos]
test eax, eax
je 0x1006ba6e
lea eax, [esp + 8]
push eax
push dword [edi + 0x2b4]
call dword [sym.imp.USER32.dll_ScreenToClient]
movd xmm0, dword [esp + 8]
cvtdq2pd xmm0, xmm0
movsd qword [0x10107900], xmm0
movd xmm0, dword [esp + 0xc]
cvtdq2pd xmm0, xmm0
movsd qword [0x10107908], xmm0
mov eax, dword [edi + 0x70]
cmp eax, 0x34001
je 0x1006ba87
cmp eax, 0x34004
je 0x1006ba87
push dword [0x10107924]
jmp 0x1006baa1
mov eax, dword [edi + 0x44]
test eax, eax
je 0x1006ba93
push dword [eax + 4]
jmp 0x1006baa1
push 0x7f00
push 0
call dword [sym.imp.USER32.dll_LoadCursorW]
push eax
call dword [sym.imp.USER32.dll_SetCursor]
push edi
call fcn.10064140
add esp, 4
lea eax, [esp + 8]
push eax
push dword [edi + 0x2b4]
call dword [sym.imp.USER32.dll_GetClientRect]
lea eax, [esp + 8]
push eax
push dword [edi + 0x2b4]
call dword [sym.imp.USER32.dll_ClientToScreen]
lea eax, [esp + 0x10]
push eax
push dword [edi + 0x2b4]
call dword [sym.imp.USER32.dll_ClientToScreen]
lea eax, [esp + 8]
push eax
call dword [sym.imp.USER32.dll_ClipCursor]
mov dword [0x10107914], edi
cmp dword [edi + 0x1f0], 0
je 0x1006bb3c
mov eax, dword [edi + 0x2b4]
push 0xc
mov dword [esp + 0x14], eax
lea eax, [esp + 0xc]
push 1
push eax
mov dword [esp + 0x14], 0x20001
mov dword [esp + 0x18], 0
call dword [sym.imp.USER32.dll_RegisterRawInputDevices]
test eax, eax
jne 0x1006bb3c
push str.Win32:_Failed_to_register_raw_input_device
push 0x10008
call fcn.100672c0
add esp, 8
mov ecx, dword [esp + 0x18]
pop edi
pop ebx
xor ecx, esp
call fcn.10078315
add esp, 0x14
ret

Function at 0x1006bb50
Capabilities:
Register raw input devices

Disassembly:
sub esp, 0xc
push 0xc
push 1
lea eax, [esp + 8]
mov dword [esp + 8], 0x20001
push eax
mov dword [esp + 0x10], 1
mov dword [esp + 0x14], 0
call dword [sym.imp.USER32.dll_RegisterRawInputDevices]
test eax, eax
jne 0x1006bb90
push str.Win32:_Failed_to_remove_raw_input_device
push 0x10008
call fcn.100672c0
add esp, 8
add esp, 0xc
ret
Function at 0x1006bba0
Capabilities:
Register raw input devices

Disassembly:
sub esp, 0xc
push esi
mov esi, dword [esp + 0x14]
cmp dword [esi + 0x1f0], 0
je 0x1006bbee
push 0xc
push 1
lea eax, [esp + 0xc]
mov dword [esp + 0xc], 0x20001
push eax
mov dword [esp + 0x14], 1
mov dword [esp + 0x18], 0
call dword [sym.imp.USER32.dll_RegisterRawInputDevices]
test eax, eax
jne 0x1006bbee
push str.Win32:_Failed_to_remove_raw_input_device
push 0x10008
call fcn.100672c0
add esp, 8
push 0
mov dword [0x10107910], 0
call dword [sym.imp.USER32.dll_ClipCursor]
cvttsd2si eax, qword [0x10107908]
mov dword [0x10107914], 0
cvttsd2si ecx, qword [0x10107900]
mov dword [esp + 8], eax
mov dword [esi + 0x2ec], eax
lea eax, [esp + 4]
push eax
push dword [esi + 0x2b4]
mov dword [esp + 0xc], ecx
mov dword [esi + 0x2e8], ecx
call dword [sym.imp.USER32.dll_ClientToScreen]
push dword [esp + 8]
push dword [esp + 8]
call dword [sym.imp.USER32.dll_SetCursorPos]
mov eax, dword [esi + 0x70]
cmp eax, 0x34001
je 0x1006bc6f
cmp eax, 0x34004
je 0x1006bc6f
push dword [0x10107924]
call dword [sym.imp.USER32.dll_SetCursor]
pop esi
add esp, 0xc
ret
mov eax, dword [esi + 0x44]
test eax, eax
je 0x1006bc84
push dword [eax + 4]
call dword [sym.imp.USER32.dll_SetCursor]
pop esi
add esp, 0xc
ret
push 0x7f00
push 0
call dword [sym.imp.USER32.dll_LoadCursorW]
push eax
call dword [sym.imp.USER32.dll_SetCursor]
pop esi
add esp, 0xc
ret

Function at 0x1006bca0
Capabilities:
Register raw input devices

Disassembly:
sub esp, 0xc
mov eax, dword [esp + 0x10]
push 0xc
push 1
mov dword [esp + 8], 0x20001
mov eax, dword [eax + 0x2b4]
mov dword [esp + 0x10], eax
lea eax, [esp + 8]
push eax
mov dword [esp + 0x10], 0
call dword [sym.imp.USER32.dll_RegisterRawInputDevices]
test eax, eax
jne 0x1006bce6
push str.Win32:_Failed_to_register_raw_input_device
push 0x10008
call fcn.100672c0
add esp, 8
add esp, 0xc
ret

Function at 0x1006bd70
Capabilities:
Log keystrokes via polling

Disassembly:
push ebx
push ebp
mov ebp, dword [sym.imp.USER32.dll_GetKeyState]
push esi
push edi
push 0x10
call ebp
movzx esi, ax
push 0x11
shr esi, 0xf
call ebp
mov edi, esi
or edi, 2
test ax, ax
push 0x12
cmovns edi, esi
call ebp
mov ebx, edi
or ebx, 4
test ax, ax
push 0x5c
cmovns ebx, edi
call ebp
push 0x5b
mov si, ax
call ebp
mov edi, ebx
or edi, 8
or si, ax
push 0x14
cmovns edi, ebx
call ebp
mov esi, edi
or esi, 0x10
test al, 1
push 0x90
cmove esi, edi
call ebp
mov ecx, esi
or ecx, 0x20
test al, 1
pop edi
cmove ecx, esi
pop esi
pop ebp
mov eax, ecx
pop ebx
ret
Function at 0x1007db54
Capabilities:
Read file on windows

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
mov eax, 0x101c
call fcn.100797b0
mov eax, dword [0x100ee940]
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.1008f642
pop ecx
mov ecx, dword [ebp + 8]
mov ebx, eax
cmp dword [ecx + 8], 0
jne 0x1007db96
mov eax, dword [ebp + 0xc]
mov edx, dword [ebp + 0x10]
jmp 0x1007dcf2
mov eax, dword [ecx]
sub eax, dword [ecx + 4]
push esi
push edi
push 0
cdq
push 2
push edx
push eax
call fcn.100a4590
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 + 0x10108c48]
push dword [eax + edi + 0x24]
push dword [eax + edi + 0x20]
push ebx
call fcn.1008f851
mov ecx, dword [esi*4 + 0x10108c48]
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 0x1007dceb
cmp eax, dword [ecx + edi + 0x24]
jne 0x1007dceb
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 0x1007dceb
push dword [ebp - 0x100c]
push 0
push dword [ebp + 0x10]
push dword [ebp + 0xc]
push ebx
call fcn.1008f851
add esp, 0x14
test edx, edx
jl 0x1007dceb
jg 0x1007dc61
test eax, eax
jb 0x1007dceb
mov ebx, dword [ebp - 0x1018]
mov eax, dword [ebp - 0x1014]
test ebx, ebx
jg 0x1007dceb
jl 0x1007dc7b
cmp dword [ebp - 0x1008], eax
ja 0x1007dceb
lea edi, [ebp - 0x1004]
xor edx, edx
add edi, eax
lea ecx, [ebp - 0x1004]
xor esi, esi
cmp dword [ebp - 0x1008], edx
jne 0x1007dc99
test ebx, ebx
je 0x1007dcd2
cmp ecx, edi
jae 0x1007dcd2
mov al, byte [ecx]
cmp al, 0xd
jne 0x1007dcb3
lea eax, [edi - 1]
cmp ecx, eax
jae 0x1007dcbf
cmp byte [ecx + 1], 0xa
jne 0x1007dcbf
inc ecx
jmp 0x1007dcbf
movzx eax, al
movsx eax, byte [eax + 0x100eebc0]
add ecx, eax
add esi, 1
adc edx, 0
inc ecx
cmp esi, dword [ebp - 0x1008]
jne 0x1007dc99
cmp edx, ebx
jne 0x1007dc99
lea eax, [ebp - 0x1004]
sub ecx, eax
mov eax, ecx
cdq
add eax, dword [ebp - 0x1010]
adc edx, dword [ebp - 0x101c]
jmp 0x1007dcf0
or edx, 0xffffffff
mov eax, edx
pop edi
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
pop ebx
call fcn.10078315
leave
ret

Function at 0x1008bfa8
Capabilities:
Parse pe header

Disassembly:
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleHandleW]
test eax, eax
je 0x1008bfe7
mov ecx, 0x5a4d
cmp word [eax], cx
jne 0x1008bfe7
mov ecx, dword [eax + 0x3c]
add ecx, eax
cmp dword [ecx], 0x4550
jne 0x1008bfe7
mov eax, 0x10b
cmp word [ecx + 0x18], ax
jne 0x1008bfe7
cmp dword [ecx + 0x74], 0xe
jbe 0x1008bfe7
cmp dword [ecx + 0xe8], 0
setne al
ret
xor al, al
ret
Function at 0x100915e7
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 + 0x10108c48]
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 0x10091627
cmp byte [ebx], 0xa
jne 0x10091627
or byte [edi + eax + 0x28], 4
jmp 0x1009162c
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 0x1009172b
mov dl, byte [eax]
cmp dl, 0x1a
je 0x1009170e
inc eax
cmp dl, 0xd
je 0x10091658
mov dword [ebp - 8], eax
mov byte [esi], dl
jmp 0x1009167e
cmp eax, ecx
jae 0x1009168c
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 0x10091640
jmp 0x1009172b
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 0x10091709
cmp dword [ebp - 0x10], 0
je 0x10091709
mov ecx, dword [ebp - 0xc]
mov eax, dword [ecx*4 + 0x10108c48]
test byte [eax + edi + 0x28], 0x48
je 0x100916e3
mov dl, byte [ebp - 1]
lea eax, [esi + 1]
mov dword [ebp - 0x14], eax
cmp dl, 0xa
jne 0x100916ce
mov byte [esi], dl
jmp 0x100916df
mov byte [esi], 0xd
mov eax, dword [ecx*4 + 0x10108c48]
mov byte [eax + edi + 0x2a], dl
mov eax, dword [ebp - 0x14]
mov esi, eax
jmp 0x1009172b
cmp byte [ebp - 1], 0xa
jne 0x100916f2
cmp esi, ebx
jne 0x100916f2
mov byte [esi], 0xa
jmp 0x1009172a
push 1
push 0xffffffffffffffff
push 0xffffffffffffffff
push dword [ebp + 8]
call fcn.1008f86f
add esp, 0x10
cmp byte [ebp - 1], 0xa
je 0x1009172b
mov byte [esi], 0xd
jmp 0x1009172a
mov ecx, dword [ebp - 0xc]
mov ecx, dword [ecx*4 + 0x10108c48]
mov al, byte [ecx + edi + 0x28]
test al, 0x40
jne 0x10091728
or al, 2
mov byte [ecx + edi + 0x28], al
jmp 0x1009172b
mov byte [esi], dl
inc esi
sub esi, ebx
pop edi
mov eax, esi
pop esi
pop ebx
leave
ret
Function at 0x10091734
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 + 0x10108c48]
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 0x1009177a
cmp word [ebx], dx
jne 0x1009177a
or byte [eax + edi + 0x28], 4
jmp 0x1009177f
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 0x100918e2
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 0x100918c2
add eax, 2
cmp cx, word [ebp - 0x10]
je 0x100917c0
mov dword [ebp - 4], eax
mov word [esi], cx
jmp 0x100917f6
cmp eax, edx
jae 0x10091804
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 0x1009179b
jmp 0x100918e2
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 0x100918bd
cmp dword [ebp - 0x18], 0
je 0x100918bd
mov edx, dword [ebp - 8]
push 0xa
mov eax, dword [edx*4 + 0x10108c48]
test byte [eax + edi + 0x28], 0x48
je 0x10091893
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 0x10091857
mov word [esi], cx
jmp 0x1009188e
push 0xd
pop ecx
mov word [esi], cx
movzx ecx, ax
mov eax, dword [edx*4 + 0x10108c48]
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 + 0x10108c48]
mov byte [eax + edi + 0x2b], cl
mov eax, dword [edx*4 + 0x10108c48]
pop ecx
mov byte [eax + edi + 0x2c], cl
mov esi, dword [ebp - 0x1c]
jmp 0x100918e2
pop eax
cmp word [ebp - 4], ax
jne 0x100918a3
cmp esi, ebx
jne 0x100918a3
mov word [esi], ax
jmp 0x100918df
push 1
push 0xffffffffffffffff
push 0xfffffffffffffffe
push dword [ebp + 8]
call fcn.1008f86f
add esp, 0x10
push 0xa
pop eax
cmp word [ebp - 4], ax
je 0x100918e2
push 0xd
pop eax
jmp 0x1009189e
mov edx, dword [ebp - 8]
mov edx, dword [edx*4 + 0x10108c48]
mov al, byte [edx + edi + 0x28]
test al, 0x40
jne 0x100918dc
or al, 2
mov byte [edx + edi + 0x28], al
jmp 0x100918e2
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 0x10092ff4
Capabilities:
Allocate thread local storage

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
push esi
push 0x100d5c04
push 0x100d5bfc
push str.FlsAlloc
push 0x1f
call fcn.10092e1c
mov esi, eax
add esp, 0x10
test esi, esi
je 0x10093028
push dword [ebp + 8]
mov ecx, esi
call dword [0x100aa34c]
call esi
jmp 0x1009302e
call dword [sym.imp.KERNEL32.dll_TlsAlloc]
pop esi
pop ebp
ret 4

Function at 0x10093072
Capabilities:
Get thread local storage value

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
push esi
push 0x100d5c14
push 0x100d5c0c
push str.FlsGetValue
push 0x21
call fcn.10092e1c
mov esi, eax
add esp, 0x10
test esi, esi
je 0x100930a9
push dword [ebp + 8]
mov ecx, esi
call dword [0x100aa34c]
call esi
pop esi
pop ebp
ret 4
pop esi
pop ebp
jmp dword [sym.imp.KERNEL32.dll_TlsGetValue]

Function at 0x100930b1
Capabilities:
Set thread local storage value

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
push esi
push 0x100d5c1c
push 0x100d5c14
push str.FlsSetValue
push 0x22
call fcn.10092e1c
mov esi, eax
add esp, 0x10
test esi, esi
je 0x100930eb
push dword [ebp + 0xc]
mov ecx, esi
push dword [ebp + 8]
call dword [0x100aa34c]
call esi
pop esi
pop ebp
ret 8
pop esi
pop ebp
jmp dword [sym.imp.KERNEL32.dll_TlsSetValue]
Function at 0x10098cab
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 0x10098d48
push ebx
push esi
call fcn.10098c74
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.10097a62
add esp, 0x24
mov dword [ebp - 4], eax
test eax, eax
jne 0x10098cf5
push esi
call dword [sym.imp.KERNEL32.dll_FreeEnvironmentStringsW]
xor eax, eax
jmp 0x10098d47
push edi
push eax
call fcn.100945c9
mov edi, eax
pop ecx
push ebx
test edi, edi
jne 0x10098d15
call fcn.10092b3d
pop ecx
push esi
call dword [sym.imp.KERNEL32.dll_FreeEnvironmentStringsW]
xor eax, eax
jmp 0x10098d46
push ebx
push dword [ebp - 4]
push edi
push dword [ebp - 8]
push esi
push ebx
push ebx
call fcn.10097a62
add esp, 0x20
test eax, eax
jne 0x10098d34
push edi
call fcn.10092b3d
jmp 0x10098d3c
push ebx
call fcn.10092b3d
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 0x1009b783
Capabilities:
Get geographical location

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
push ecx
push esi
push edi
call fcn.1008fc37
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 0x1009b7f2
cmp esi, dword [ebp - 4]
je 0x1009b7ed
cmp dword [ebp + 0xc], 0
je 0x1009b7ed
mov esi, dword [edi + 0x50]
lea ecx, [esi + 2]
mov ax, word [esi]
add esi, 2
test ax, ax
jne 0x1009b7ca
push dword [edi + 0x50]
sub esi, ecx
sar esi, 1
call fcn.1009b2d5
pop ecx
xor ecx, ecx
cmp eax, esi
setne cl
mov eax, ecx
jmp 0x1009b7f4
xor eax, eax
inc eax
jmp 0x1009b7f4
xor eax, eax
pop edi
pop esi
leave
ret