joyce8/EMBER2024-capa huggingface dataset:
Function at 0x4805f0
Capabilities:
Log keystrokes via polling

Disassembly:
push ebx
mov ebx, dword [sym.imp.USER32.dll_GetAsyncKeyState]
push esi
push edi
push 0x10
call ebx
movzx esi, ax
push 0x11
shr esi, 0xf
call ebx
mov ecx, 0x8000
mov edi, esi
or edi, 2
and ax, cx
push 0x12
cmove edi, esi
call ebx
mov ebx, edi
mov ecx, 0x8000
or ebx, 4
and ax, cx
push 0x5c
cmove ebx, edi
mov edi, dword [sym.imp.USER32.dll_GetAsyncKeyState]
call edi
push 0x5b
mov si, ax
call edi
mov edi, ebx
or edi, 8
or si, ax
push 0x14
cmovns edi, ebx
mov ebx, dword [sym.imp.USER32.dll_GetAsyncKeyState]
call ebx
mov esi, edi
or esi, 0x10
and al, 1
push 0x90
cmove esi, edi
call ebx
mov ecx, esi
or ecx, 0x20
and al, 1
pop edi
cmove ecx, esi
pop esi
mov eax, ecx
pop ebx
ret

Function at 0x480710
Capabilities:
Log keystrokes via polling

Disassembly:
push ebx
mov ebx, dword [sym.imp.USER32.dll_GetKeyState]
push esi
push edi
push 0x10
call ebx
movzx esi, ax
push 0x11
shr esi, 0xf
call ebx
mov ecx, 0x8000
mov edi, esi
or edi, 2
and ax, cx
push 0x12
cmove edi, esi
call ebx
mov ebx, edi
mov ecx, 0x8000
or ebx, 4
and ax, cx
push 0x5c
cmove ebx, edi
mov edi, dword [sym.imp.USER32.dll_GetKeyState]
call edi
push 0x5b
mov si, ax
call edi
mov edi, ebx
or edi, 8
or si, ax
push 0x14
cmovns edi, ebx
mov ebx, dword [sym.imp.USER32.dll_GetKeyState]
call ebx
mov esi, edi
or esi, 0x10
and al, 1
push 0x90
cmove esi, edi
call ebx
mov ecx, esi
or ecx, 0x20
and al, 1
pop edi
cmove ecx, esi
pop esi
mov eax, ecx
pop ebx
ret

Function at 0x4825e0
Capabilities:
Allocate thread local storage

Disassembly:
push ebp
mov ebp, esp
call dword [sym.imp.KERNEL32.DLL_TlsAlloc]
mov ecx, dword [ebp + 8]
mov dword [ecx + 4], eax
cmp eax, 0xffffffff
jne 0x48260a
push str.Win32:_Failed_to_allocate_TLS_index
push 0x10008
call fcn.00482810
add esp, 8
xor eax, eax
pop ebp
ret
mov dword [ecx], 1
mov eax, 1
pop ebp
ret
Function at 0x482e70
Capabilities:
Log keystrokes

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x168
mov eax, dword [0xec8960]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
push esi
push edi
push 0x100
lea eax, [ebp - 0x124]
push 0
push eax
call fcn.0048b190
push 0x6d1
push 0
push 0xecca56
call fcn.0048b190
mov eax, 0xeccaf6
lea ebx, [ebp - 0x160]
add esp, 0x18
mov dword [ebp - 0x164], eax
mov esi, 0x20
sub ebx, 0x480
nop dword [eax]
movsx edi, word [esi*2 + 0xecc79c]
cmp edi, 0xffffffff
je 0x483004
cmp esi, 0x140
jl 0x482f93
cmp esi, 0x14e
jg 0x482f93
mov dword [ebp - 0x160], 0x60
mov dword [ebp - 0x15c], 0x61
mov dword [ebp - 0x158], 0x62
mov dword [ebp - 0x154], 0x63
mov dword [ebp - 0x150], 0x64
mov dword [ebp - 0x14c], 0x65
mov dword [ebp - 0x148], 0x66
mov dword [ebp - 0x144], 0x67
mov dword [ebp - 0x140], 0x68
mov dword [ebp - 0x13c], 0x69
mov dword [ebp - 0x138], 0x6e
mov dword [ebp - 0x134], 0x6f
mov dword [ebp - 0x130], 0x6a
mov dword [ebp - 0x12c], 0x6d
mov dword [ebp - 0x128], 0x6b
mov eax, dword [ebx]
jmp 0x482f9c
push 1
push edi
call dword [sym.imp.USER32.dll_MapVirtualKeyW]
push 0
push 0x10
lea ecx, [ebp - 0x24]
mov dword [ebp - 0x168], eax
push ecx
lea ecx, [ebp - 0x124]
push ecx
push edi
push eax
call dword [sym.imp.USER32.dll_ToUnicode]
cmp eax, 0xffffffff
jne 0x482fda
push 0
push 0x10
lea eax, [ebp - 0x24]
push eax
lea eax, [ebp - 0x124]
push eax
push edi
push dword [ebp - 0x168]
call dword [sym.imp.USER32.dll_ToUnicode]
cmp eax, 1
jl 0x482ffe
push 0
push 0
push 5
push dword [ebp - 0x164]
lea eax, [ebp - 0x24]
push 1
push eax
push 0
push 0xfde9
call dword [sym.imp.KERNEL32.DLL_WideCharToMultiByte]
mov eax, dword [ebp - 0x164]
inc esi
add eax, 5
add ebx, 4
mov dword [ebp - 0x164], eax
cmp esi, 0x15c
jle 0x482ed0
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.004888df
mov esp, ebp
pop ebp
ret
Function at 0x4832e0
Capabilities:
Link many functions at runtime

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x1c
mov eax, dword [0xec8960]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
mov ebx, dword [sym.imp.KERNEL32.DLL_LoadLibraryA]
push 0x4d7b14
call ebx
mov dword [0xecd148], eax
test eax, eax
jne 0x48332a
push str.Win32:_Failed_to_load_winmm.dll
push 0x10008
call fcn.00482810
add esp, 8
xor eax, eax
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004888df
mov esp, ebp
pop ebp
ret
push edi
mov edi, dword [sym.imp.KERNEL32.DLL_GetProcAddress]
push 0x4d7b40
push eax
call edi
push str.user32.dll
mov dword [0xecd14c], eax
call ebx
mov dword [0xecd168], eax
test eax, eax
jne 0x483372
push str.Win32:_Failed_to_load_user32.dll
push 0x10008
call fcn.00482810
add esp, 8
xor eax, eax
pop edi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004888df
mov esp, ebp
pop ebp
ret
push str.SetProcessDPIAware
push eax
call edi
push str.ChangeWindowMessageFilterEx
push dword [0xecd168]
mov dword [0xecd16c], eax
call edi
push str.EnableNonClientDpiScaling
push dword [0xecd168]
mov dword [0xecd170], eax
call edi
push str.SetProcessDpiAwarenessContext
push dword [0xecd168]
mov dword [0xecd174], eax
call edi
push str.GetDpiForWindow
push dword [0xecd168]
mov dword [0xecd178], eax
call edi
push str.AdjustWindowRectExForDpi
push dword [0xecd168]
mov dword [0xecd17c], eax
call edi
push str.dinput8.dll
mov dword [0xecd180], eax
call ebx
mov dword [0xecd150], eax
test eax, eax
je 0x4833f6
push str.DirectInput8Create
push eax
call edi
mov dword [0xecd154], eax
push esi
mov dword [ebp - 0x1c], str.xinput1_4.dll
xor esi, esi
mov dword [ebp - 0x18], str.xinput1_3.dll
mov eax, str.xinput1_4.dll
mov dword [ebp - 0x14], str.xinput9_1_0.dll
mov dword [ebp - 0x10], str.xinput1_2.dll
mov dword [ebp - 0xc], str.xinput1_1.dll
mov dword [ebp - 8], 0
push eax
call ebx
mov dword [0xecd15c], eax
test eax, eax
jne 0x48343f
mov eax, dword [ebp + esi*4 - 0x18]
inc esi
test eax, eax
jne 0x483428
jmp 0x48345e
push str.XInputGetCapabilities
push eax
call edi
push str.XInputGetState
push dword [0xecd15c]
mov dword [0xecd160], eax
call edi
mov dword [0xecd164], eax
push str.dwmapi.dll
call ebx
mov dword [0xecd184], eax
pop esi
test eax, eax
je 0x4834a0
push str.DwmIsCompositionEnabled
push eax
call edi
push str.DwmFlush
push dword [0xecd184]
mov dword [0xecd188], eax
call edi
push str.DwmEnableBlurBehindWindow
push dword [0xecd184]
mov dword [0xecd18c], eax
call edi
mov dword [0xecd190], eax
push str.shcore.dll
call ebx
mov dword [0xecd194], eax
test eax, eax
je 0x4834cf
push str.SetProcessDpiAwareness
push eax
call edi
push str.GetDpiForMonitor
push dword [0xecd194]
mov dword [0xecd198], eax
call edi
mov dword [0xecd19c], eax
push str.ntdll.dll
call ebx
mov dword [0xecd1a0], eax
test eax, eax
je 0x4834ec
push str.RtlVerifyVersionInfo
push eax
call edi
mov dword [0xecd1a4], eax
mov ecx, dword [ebp - 4]
mov eax, 1
pop edi
xor ecx, ebp
pop ebx
call fcn.004888df
mov esp, ebp
pop ebp
ret
Function at 0x486950
Capabilities:
Link many functions at runtime

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x10
mov eax, dword [0xec8960]
xor eax, ebp
mov dword [ebp - 4], eax
cmp dword [0xecd278], 0
mov dword [ebp - 0x10], str.libOSMesa.dll
mov dword [ebp - 0xc], str.OSMesa.dll
mov dword [ebp - 8], 0
je 0x486991
mov eax, 1
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004888df
mov esp, ebp
pop ebp
ret
push esi
push edi
mov edi, dword [sym.imp.KERNEL32.DLL_LoadLibraryA]
xor esi, esi
mov eax, str.libOSMesa.dll
push eax
call edi
mov dword [0xecd278], eax
test eax, eax
jne 0x4869d9
mov eax, dword [ebp + esi*4 - 0xc]
inc esi
test eax, eax
jne 0x4869a0
push str.OSMesa:_Library_not_found
push 0x10006
call fcn.0047d8a0
add esp, 8
xor eax, eax
pop edi
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004888df
mov esp, ebp
pop ebp
ret
mov esi, dword [sym.imp.KERNEL32.DLL_GetProcAddress]
push str.OSMesaCreateContextExt
push eax
call esi
push str.OSMesaCreateContextAttribs
push dword [0xecd278]
mov dword [0xecd27c], eax
call esi
push str.OSMesaDestroyContext
push dword [0xecd278]
mov dword [0xecd280], eax
call esi
push str.OSMesaMakeCurrent
push dword [0xecd278]
mov dword [0xecd284], eax
call esi
push str.OSMesaGetColorBuffer
push dword [0xecd278]
mov dword [0xecd288], eax
call esi
push str.OSMesaGetDepthBuffer
push dword [0xecd278]
mov dword [0xecd28c], eax
call esi
push str.OSMesaGetProcAddress
push dword [0xecd278]
mov dword [0xecd290], eax
call esi
cmp dword [0xecd27c], 0
mov dword [0xecd294], eax
je 0x486a9e
cmp dword [0xecd284], 0
je 0x486a9e
cmp dword [0xecd288], 0
je 0x486a9e
cmp dword [0xecd28c], 0
je 0x486a9e
cmp dword [0xecd290], 0
je 0x486a9e
test eax, eax
je 0x486a9e
pop edi
mov eax, 1
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004888df
mov esp, ebp
pop ebp
ret
push str.OSMesa:_Failed_to_load_required_entry_points
push 0x10008
call fcn.0047d8a0
mov eax, dword [0xecd278]
add esp, 8
test eax, eax
je 0x486aca
push eax
call dword [sym.imp.KERNEL32.DLL_FreeLibrary]
mov dword [0xecd278], 0
mov ecx, dword [ebp - 4]
xor eax, eax
pop edi
xor ecx, ebp
pop esi
call fcn.004888df
mov esp, ebp
pop ebp
ret
Function at 0x487c8d
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
push ecx
mov eax, dword [ebp + 0x10]
push ebx
mov ebx, ecx
push edi
mov edi, dword [ebp + 0xc]
test eax, eax
jg 0x487cae
jl 0x487ca5
test edi, edi
jne 0x487cae
xor eax, eax
xor edx, edx
jmp 0x487d6f
cmp dword [ebx + 0x38], 0
je 0x487cc3
push eax
push edi
push dword [ebp + 8]
call fcn.004416d0
jmp 0x487d6f
mov eax, dword [ebx + 0x1c]
push esi
mov esi, edi
mov ecx, dword [eax]
test ecx, ecx
je 0x487d0a
mov eax, dword [ebx + 0x2c]
mov eax, dword [eax]
mov dword [ebp - 4], eax
test eax, eax
je 0x487d0a
cmp eax, edi
jb 0x487ce4
mov eax, edi
mov dword [ebp - 4], edi
push eax
push ecx
push dword [ebp + 8]
call fcn.0048ac10
mov ecx, dword [ebp - 4]
add esp, 0xc
mov eax, dword [ebp + 8]
sub esi, ecx
add eax, ecx
mov dword [ebp - 4], eax
mov eax, dword [ebx + 0x2c]
sub dword [eax], ecx
mov eax, dword [ebx + 0x1c]
add dword [eax], ecx
jmp 0x487d10
mov eax, dword [ebp + 8]
mov dword [ebp - 4], eax
cmp dword [ebx + 0x4c], 0
je 0x487d64
mov ecx, ebx
call fcn.00487604
mov ecx, dword [ebp - 4]
mov edx, esi
mov eax, 0xfff
cmp esi, eax
jbe 0x487d4f
push dword [ebx + 0x4c]
push eax
push 1
push ecx
call fcn.00498d4f
mov ecx, dword [ebp - 4]
sub esi, eax
add ecx, eax
add esp, 0x10
mov dword [ebp - 4], ecx
mov edx, esi
cmp eax, 0xfff
jne 0x487d64
jmp 0x487d22
test edx, edx
je 0x487d64
push dword [ebx + 0x4c]
push esi
push 1
push ecx
call fcn.00498d4f
add esp, 0x10
sub esi, eax
mov edx, dword [ebp + 0x10]
sub edi, esi
mov eax, edi
sbb edx, 0
pop esi
pop edi
pop ebx
leave
ret 0xc

Function at 0x4899a5
Capabilities:
Parse pe header

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

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
mov eax, 0x101c
call fcn.00489c00
mov eax, dword [0xec8960]
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.004a5282
pop ecx
mov ecx, dword [ebp + 8]
mov ebx, eax
cmp dword [ecx + 8], 0
jne 0x498504
mov eax, dword [ebp + 0xc]
mov edx, dword [ebp + 0x10]
jmp 0x498660
mov eax, dword [ecx]
sub eax, dword [ecx + 4]
push esi
push edi
push 0
cdq
push 2
push edx
push eax
call fcn.004b0d40
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 + 0xece088]
push dword [edi + eax + 0x24]
push dword [edi + eax + 0x20]
push ebx
call fcn.0049cb88
mov ecx, dword [esi*4 + 0xece088]
add esp, 0x14
mov dword [ebp - 0x1010], eax
mov eax, edx
mov edx, dword [ebp - 0x1010]
mov dword [ebp - 0x101c], eax
cmp edx, dword [edi + ecx + 0x20]
jne 0x498659
cmp eax, dword [edi + ecx + 0x24]
jne 0x498659
push 0
lea eax, [ebp - 0x1014]
push eax
push 0x1000
lea eax, [ebp - 0x1004]
push eax
push dword [edi + ecx + 0x18]
call dword [sym.imp.KERNEL32.DLL_ReadFile]
test eax, eax
je 0x498659
push dword [ebp - 0x100c]
push 0
push dword [ebp + 0x10]
push dword [ebp + 0xc]
push ebx
call fcn.0049cb88
add esp, 0x14
test edx, edx
jl 0x498659
jg 0x4985cf
test eax, eax
jb 0x498659
mov ebx, dword [ebp - 0x1018]
mov eax, dword [ebp - 0x1014]
test ebx, ebx
jg 0x498659
jl 0x4985e9
cmp dword [ebp - 0x1008], eax
ja 0x498659
lea edi, [ebp - 0x1004]
xor edx, edx
add edi, eax
lea ecx, [ebp - 0x1004]
xor esi, esi
cmp dword [ebp - 0x1008], edx
jne 0x498607
test ebx, ebx
je 0x498640
cmp ecx, edi
jae 0x498640
mov al, byte [ecx]
cmp al, 0xd
jne 0x498621
lea eax, [edi - 1]
cmp ecx, eax
jae 0x49862d
cmp byte [ecx + 1], 0xa
jne 0x49862d
inc ecx
jmp 0x49862d
movzx eax, al
movsx eax, byte [eax + 0xec8ac0]
add ecx, eax
add esi, 1
adc edx, 0
inc ecx
cmp esi, dword [ebp - 0x1008]
jne 0x498607
cmp edx, ebx
jne 0x498607
lea eax, [ebp - 0x1004]
sub ecx, eax
mov eax, ecx
cdq
add eax, dword [ebp - 0x1010]
adc edx, dword [ebp - 0x101c]
jmp 0x49865e
or edx, 0xffffffff
mov eax, edx
pop edi
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
pop ebx
call fcn.004888df
leave
ret
Function at 0x4a27fd
Capabilities:
Read file on windows

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x14
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 + 0xece088]
mov dword [ebp - 0x10], ecx
mov ecx, dword [eax + edi + 0x18]
mov dword [ebp - 0x14], ecx
mov ecx, dword [ebp + 0x10]
test ecx, ecx
je 0x4a283d
cmp byte [ebx], 0xa
jne 0x4a283d
or byte [eax + edi + 0x28], 4
jmp 0x4a2842
and byte [eax + edi + 0x28], 0xfb
add ecx, ebx
mov edx, ebx
mov dword [ebp - 0xc], ecx
mov esi, ebx
cmp ebx, ecx
jae 0x4a2940
mov al, byte [edx]
cmp al, 0x1a
je 0x4a2922
lea ecx, [edx + 1]
mov dword [ebp - 8], ecx
mov ecx, dword [ebp - 0xc]
cmp al, 0xd
je 0x4a2871
mov edx, dword [ebp - 8]
mov byte [esi], al
jmp 0x4a2896
mov eax, dword [ebp - 8]
cmp eax, ecx
jae 0x4a28a0
mov cl, byte [eax]
xor eax, eax
cmp cl, 0xa
sete al
inc eax
add edx, eax
cmp cl, 0xa
sete al
dec al
and al, 3
add al, 0xa
mov byte [esi], al
mov ecx, dword [ebp - 0xc]
inc esi
cmp edx, ecx
jb 0x4a2853
jmp 0x4a2940
push 0
lea eax, [ebp - 0xc]
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 0x4a291d
cmp dword [ebp - 0xc], 0
je 0x4a291d
mov ecx, dword [ebp - 0x10]
mov eax, dword [ecx*4 + 0xece088]
test byte [eax + edi + 0x28], 0x48
je 0x4a28f7
mov dl, byte [ebp - 1]
lea eax, [esi + 1]
mov dword [ebp - 0x14], eax
cmp dl, 0xa
jne 0x4a28e2
mov byte [esi], dl
jmp 0x4a28f3
mov byte [esi], 0xd
mov eax, dword [ecx*4 + 0xece088]
mov byte [eax + edi + 0x2a], dl
mov eax, dword [ebp - 0x14]
mov esi, eax
jmp 0x4a2940
cmp byte [ebp - 1], 0xa
jne 0x4a2906
cmp esi, ebx
jne 0x4a2906
mov byte [esi], 0xa
jmp 0x4a293f
push 1
push 0xffffffffffffffff
push 0xffffffffffffffff
push dword [ebp + 8]
call fcn.0049cba6
add esp, 0x10
cmp byte [ebp - 1], 0xa
je 0x4a2940
mov byte [esi], 0xd
jmp 0x4a293f
mov ecx, dword [ebp - 0x10]
mov ecx, dword [ecx*4 + 0xece088]
mov al, byte [ecx + edi + 0x28]
test al, 0x40
jne 0x4a293c
or al, 2
mov byte [ecx + edi + 0x28], al
jmp 0x4a2940
mov byte [esi], 0x1a
inc esi
sub esi, ebx
pop edi
mov eax, esi
pop esi
pop ebx
leave
ret
Function at 0x4a2949
Capabilities:
Read file on windows

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x18
mov eax, dword [ebp + 8]
push ebx
push esi
mov esi, dword [ebp + 0xc]
mov ebx, eax
and eax, 0x3f
sar ebx, 6
push edi
imul edi, eax, 0x38
push 0xa
mov eax, dword [ebx*4 + 0xece088]
pop edx
mov dword [ebp - 0x14], edx
mov ecx, dword [edi + eax + 0x18]
mov dword [ebp - 0x18], ecx
mov ecx, dword [ebp + 0x10]
test ecx, ecx
je 0x4a298c
cmp word [esi], dx
jne 0x4a298c
or byte [edi + eax + 0x28], 4
jmp 0x4a2991
and byte [edi + eax + 0x28], 0xfb
lea edx, [esi + ecx*2]
mov eax, esi
mov dword [ebp - 8], edx
mov dword [ebp - 4], eax
cmp eax, edx
jae 0x4a2ae4
mov dword [ebp - 0xc], 0xd
movzx ecx, word [eax]
mov edx, ecx
mov dword [ebp - 0x10], edx
push 0x1a
pop edx
cmp cx, dx
mov edx, dword [ebp - 8]
je 0x4a2ac4
add eax, 2
cmp cx, word [ebp - 0xc]
je 0x4a29d3
mov dword [ebp - 4], eax
mov word [esi], cx
jmp 0x4a2a09
cmp eax, edx
jae 0x4a2a15
movzx eax, word [eax]
xor ecx, ecx
cmp ax, word [ebp - 0x14]
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 - 8]
sete al
dec eax
and eax, 3
add eax, ecx
mov word [esi], ax
mov eax, dword [ebp - 4]
add esi, 2
cmp eax, edx
jb 0x4a29ab
jmp 0x4a2ae4
push 0
lea eax, [ebp - 0x14]
push eax
push 2
lea eax, [ebp - 4]
push eax
push dword [ebp - 0x18]
call dword [sym.imp.KERNEL32.DLL_ReadFile]
test eax, eax
je 0x4a2ac0
cmp dword [ebp - 0x14], 0
je 0x4a2ac0
mov eax, dword [ebx*4 + 0xece088]
push 0xa
test byte [edi + eax + 0x28], 0x48
je 0x4a2a98
mov dx, word [ebp - 4]
lea eax, [esi + 2]
pop ecx
mov dword [ebp - 0x18], eax
cmp dx, cx
jne 0x4a2a61
mov word [esi], cx
jmp 0x4a2a94
push 0xd
pop eax
mov word [esi], ax
mov eax, dword [ebx*4 + 0xece088]
movzx ecx, dx
shr ecx, 8
push 0xa
mov byte [edi + eax + 0x2a], dl
mov eax, dword [ebx*4 + 0xece088]
mov byte [edi + eax + 0x2b], cl
mov eax, dword [ebx*4 + 0xece088]
pop ecx
mov byte [edi + eax + 0x2c], cl
mov eax, dword [ebp - 0x18]
mov esi, eax
jmp 0x4a2ae4
pop ebx
cmp word [ebp - 4], bx
jne 0x4a2aa9
cmp esi, dword [ebp + 0xc]
jne 0x4a2aa9
mov word [esi], bx
jmp 0x4a2ae1
push 1
push 0xffffffffffffffff
push 0xfffffffffffffffe
push dword [ebp + 8]
call fcn.0049cba6
add esp, 0x10
cmp word [ebp - 4], bx
je 0x4a2ae4
push 0xd
jmp 0x4a2add
mov ecx, dword [ebx*4 + 0xece088]
mov al, byte [ecx + edi + 0x28]
test al, 0x40
jne 0x4a2adb
or al, 2
mov byte [ecx + edi + 0x28], al
jmp 0x4a2ae4
push 0x1a
pop eax
mov word [esi], ax
add esi, 2
sub esi, dword [ebp + 0xc]
and esi, 0xfffffffe
pop edi
mov eax, esi
pop esi
pop ebx
leave
ret
Function at 0x4a7fef
Capabilities:
Allocate thread local storage

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
push esi
push 0x4ddcf4
push 0x4ddcec
push 0x4db0a0
push 0x1e
call fcn.004a7e78
mov esi, eax
add esp, 0x10
test esi, esi
je 0x4a8023
push dword [ebp + 8]
mov ecx, esi
call dword [0x4b54a4]
call esi
jmp 0x4a8029
call dword [sym.imp.KERNEL32.DLL_TlsAlloc]
pop esi
pop ebp
ret 4

Function at 0x4a806d
Capabilities:
Get thread local storage value

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
push esi
push 0x4ddd04
push 0x4ddcfc
push 0x4db0c4
push 0x20
call fcn.004a7e78
mov esi, eax
add esp, 0x10
test esi, esi
je 0x4a80a4
push dword [ebp + 8]
mov ecx, esi
call dword [0x4b54a4]
call esi
pop esi
pop ebp
ret 4
pop esi
pop ebp
jmp dword [sym.imp.KERNEL32.DLL_TlsGetValue]

Function at 0x4a8663
Capabilities:
Read file on windows

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
pop ebp
jmp fcn.004a84d4
Function at 0x4a8c27
Capabilities:
Clear file content

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x2c
push ebx
mov ebx, dword [ebp + 8]
lea ecx, [ebp - 0x2c]
push esi
push edi
push dword [ebp + 0x10]
push dword [ebp + 0xc]
push ebx
call fcn.004a8ba3
mov eax, dword [ebp - 0x2c]
and eax, dword [ebp - 0x28]
cmp eax, 0xffffffff
je 0x4a8d9f
mov eax, dword [ebp - 0x24]
and eax, dword [ebp - 0x20]
cmp eax, 0xffffffff
je 0x4a8d9f
mov ecx, dword [ebp - 0x18]
mov eax, dword [ebp - 0x1c]
mov dword [ebp - 8], ecx
mov dword [ebp - 4], eax
test ecx, ecx
jl 0x4a8d4e
jg 0x4a8c80
test eax, eax
je 0x4a8d44
push 1
push 0x1000
call fcn.004a7af8
mov esi, eax
pop ecx
pop ecx
test esi, esi
jne 0x4a8ca6
mov eax, dword [ebp + 0x14]
push 0xc
pop edi
mov byte [eax + 0x1c], 1
mov dword [eax + 0x18], edi
jmp 0x4a8d3b
push 0x8000
push ebx
call fcn.004a026b
mov edi, dword [ebp + 0x14]
pop ecx
pop ecx
mov ecx, dword [ebp - 0x1c]
mov dword [ebp - 0xc], eax
mov eax, dword [ebp - 0x18]
test eax, eax
jl 0x4a8cd2
jg 0x4a8ccd
cmp ecx, 0x1000
jb 0x4a8cd2
mov ecx, 0x1000
push edi
push ecx
push esi
push ebx
call fcn.004a3d3f
add esp, 0x10
cmp eax, 0xffffffff
je 0x4a8d17
mov ecx, dword [ebp - 4]
cdq
sub ecx, eax
mov eax, dword [ebp - 8]
mov dword [ebp - 4], ecx
sbb eax, edx
mov dword [ebp - 8], eax
test eax, eax
jg 0x4a8ccd
jl 0x4a8cfe
test ecx, ecx
jne 0x4a8cbf
push dword [ebp - 0xc]
push ebx
call fcn.004a026b
push esi
call fcn.004a3f99
add esp, 0xc
xor edi, edi
jmp 0x4a8db0
cmp byte [edi + 0x24], 0
je 0x4a8d2e
cmp dword [edi + 0x20], 5
jne 0x4a8d2e
mov byte [edi + 0x1c], 1
mov dword [edi + 0x18], 0xd
cmp byte [edi + 0x1c], 0
je 0x4a8d39
mov edi, dword [edi + 0x18]
jmp 0x4a8d3b
xor edi, edi
push esi
call fcn.004a3f99
pop ecx
jmp 0x4a8db0
test ecx, ecx
jg 0x4a8d10
jl 0x4a8d4e
test eax, eax
jae 0x4a8d10
push 0
push dword [ebp + 0x10]
push dword [ebp + 0xc]
push ebx
call fcn.0049cba6
and eax, edx
add esp, 0x10
cmp eax, 0xffffffff
jne 0x4a8d71
mov edi, dword [ebp + 0x14]
cmp byte [edi + 0x1c], 0
je 0x4a8d10
jmp 0x4a8da8
push ebx
call fcn.00499a4b
pop ecx
push eax
call dword [sym.imp.KERNEL32.DLL_SetEndOfFile]
test eax, eax
jne 0x4a8d10
mov esi, dword [ebp + 0x14]
call dword [sym.imp.KERNEL32.DLL_GetLastError]
push 0xd
mov byte [esi + 0x24], 1
mov dword [esi + 0x20], eax
pop edi
mov byte [esi + 0x1c], 1
mov dword [esi + 0x18], edi
jmp 0x4a8db0
mov edi, dword [ebp + 0x14]
cmp byte [edi + 0x1c], 0
je 0x4a8dad
mov edi, dword [edi + 0x18]
jmp 0x4a8db0
push 0x16
pop edi
push 0
push dword [ebp - 0x28]
push dword [ebp - 0x2c]
push dword [ebp - 0x14]
call fcn.0049cba6
add esp, 0x10
mov eax, edi
pop edi
pop esi
pop ebx
leave
ret
Function at 0x4aae78
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 0x4aaf15
push ebx
push esi
call fcn.004aae41
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.004a8dca
add esp, 0x24
mov dword [ebp - 4], eax
test eax, eax
jne 0x4aaec2
push esi
call dword [sym.imp.KERNEL32.DLL_FreeEnvironmentStringsW]
xor eax, eax
jmp 0x4aaf14
push edi
push eax
call fcn.004a4359
mov edi, eax
pop ecx
push ebx
test edi, edi
jne 0x4aaee2
call fcn.004a3f99
pop ecx
push esi
call dword [sym.imp.KERNEL32.DLL_FreeEnvironmentStringsW]
xor eax, eax
jmp 0x4aaf13
push ebx
push dword [ebp - 4]
push edi
push dword [ebp - 8]
push esi
push ebx
push ebx
call fcn.004a8dca
add esp, 0x20
test eax, eax
jne 0x4aaf01
push edi
call fcn.004a3f99
jmp 0x4aaf09
push ebx
call fcn.004a3f99
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 0x4b0c20
Capabilities:
Parse pe header

Disassembly:
push ebp
mov ebp, esp
mov eax, dword [ebp + 8]
mov ecx, 0x5a4d
cmp word [eax], cx
jne 0x4b0c4d
mov ecx, dword [eax + 0x3c]
add ecx, eax
cmp dword [ecx], 0x4550
jne 0x4b0c4d
mov edx, 0x10b
xor eax, eax
cmp word [ecx + 0x18], dx
sete al
pop ebp
ret
xor eax, eax
pop ebp
ret
Function at 0x10002f90
Capabilities:
Create thread

Disassembly:
push esi
mov esi, ecx
cmp dword [esi + 8], 0
jne 0x10002fb4
lea eax, [esi + 0xc]
push eax
push 0
push esi
push 0x10003020
push 0
push 0
call fcn.100a7907
add esp, 0x18
mov dword [esi + 8], eax
pop esi
ret

Function at 0x10002fd0
Capabilities:
Terminate thread

Disassembly:
push ebp
mov ebp, esp
push esi
mov esi, ecx
mov dword [esi + 4], 1
call dword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
cmp dword [esi + 0xc], eax
je 0x10003018
cmp byte [ebp + 8], 0
je 0x10003018
mov eax, dword [esi + 8]
test eax, eax
je 0x10003018
push dword [ebp + 0xc]
push eax
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
cmp eax, 0x102
jne 0x10003018
push 0
push dword [esi + 8]
call dword [sym.imp.KERNEL32.dll_TerminateThread]
mov dword [esi + 8], 0
pop esi
pop ebp
ret 8