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

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
mov eax, dword [ebp + 8]
xor edx, edx
push ebx
push esi
push edi
mov ecx, dword [eax + 0x3c]
add ecx, eax
movzx eax, word [ecx + 0x14]
movzx ebx, word [ecx + 6]
add eax, 0x18
add eax, ecx
test ebx, ebx
je 0x40704e
mov edi, dword [ebp + 0xc]
mov esi, dword [eax + 0xc]
cmp edi, esi
jb 0x407046
mov ecx, dword [eax + 8]
add ecx, esi
cmp edi, ecx
jb 0x407050
inc edx
add eax, 0x28
cmp edx, ebx
jb 0x407036
xor eax, eax
pop edi
pop esi
pop ebx
pop ebp
ret

Function at 0x407120
Capabilities:
Parse pe header

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
mov ecx, dword [ebp + 8]
mov eax, 0x5a4d
cmp word [ecx], ax
jne 0x407151
mov eax, dword [ecx + 0x3c]
add eax, ecx
cmp dword [eax], 0x4550
jne 0x407151
mov ecx, 0x10b
cmp word [eax + 0x18], cx
jne 0x407151
mov eax, 1
pop ebp
ret
xor eax, eax
pop ebp
ret

Function at 0x401e10
Capabilities:
Get process heap force flags
Terminate process

Disassembly:
push ebp
mov ebp, esp
push edi
push esi
push ebx
and esp, 0xfffffff0
sub esp, 0x10
mov dword [esp], 1
call sub.ucrtbase.dll__configure_wide_argv
call sub.ucrtbase.dll__initialize_wide_environment
call 0x401e80
mov esi, dword [eax]
call sub.ucrtbase.dll___p___wargv
mov edi, dword [eax]
call sub.ucrtbase.dll__get_initial_wide_environment
mov ebx, eax
mov eax, dword fs:[0x18]
mov eax, dword [eax + 0x30]
mov eax, dword [eax + 8]
mov edx, dword [eax + 0x3c]
cmp word [eax + edx + 0x5c], 2
sete al
movzx eax, al
add eax, 1
mov dword [esp], eax
call sub.ucrtbase.dll__set_app_type
mov dword [esp + 8], ebx
mov dword [esp + 4], edi
mov dword [esp], esi
call fcn.00401360
mov dword [esp], eax
call sub.ucrtbase.dll_exit
jmp dword [sym.imp.ucrtbase.dll___p___argc]
Function at 0x407a90
Capabilities:
Create directory

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x14
mov eax, dword [0x43f014]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [0x43ff3c]
mov ecx, dword [ebp + 0xc]
push ebx
push esi
push edi
test eax, eax
js 0x407b9a
cmp eax, 2
jge 0x407b9a
imul edi, eax, 0x214
inc eax
push ecx
push 0x100
mov dword [0x43ff3c], eax
add edi, 0x43fb14
lea ebx, [edi + 4]
mov dword [edi], 1
push ebx
call fcn.004106d3
add esp, 0xc
cmp dword [edi], 0
je 0x407b9a
push 0
push ebx
call dword [sym.imp.KERNEL32.dll_CreateDirectoryA]
lea eax, [ebp - 0x14]
push eax
call dword [sym.imp.KERNEL32.dll_GetLocalTime]
movzx edx, word [ebp - 0xe]
lea esi, [edi + 0x110]
movzx ecx, word [ebp - 0x12]
movzx eax, word [ebp - 0x14]
push edx
push ecx
push eax
push ebx
push str.._s_04d__02d__02d.txt
push esi
mov dword [edi + 0x104], edx
mov dword [edi + 0x108], ecx
mov dword [edi + 0x10c], eax
call dword [sym.imp.USER32.dll_wsprintfA]
add esp, 0x18
push 0
push 0x80
push 4
push 0
push 1
push 0x40000000
push esi
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov dword [edi + 0x210], eax
cmp eax, 0xffffffff
jne 0x407b76
mov dword [edi], 0
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0040c166
mov esp, ebp
pop ebp
ret 8
push 2
push 0
push 0
push eax
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
cmp eax, 0xffffffff
jne 0x407b9a
push dword [edi + 0x210]
mov dword [edi], 0
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.0040c166
mov esp, ebp
pop ebp
ret 8
Function at 0x407bb0
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x824
mov eax, dword [0x43f014]
xor eax, ebp
mov dword [ebp - 8], eax
mov eax, dword [ebp + 0xc]
mov ecx, dword [ebp + 8]
push esi
push edi
test eax, eax
js 0x407d9a
cmp eax, dword [ecx + 0x42c]
jge 0x407d9a
imul edi, eax, 0x214
add edi, ecx
cmp dword [edi + 4], 0
je 0x407d9a
lea eax, [ebp - 0x81c]
push eax
call dword [sym.imp.KERNEL32.dll_GetLocalTime]
movzx eax, word [ebp - 0x816]
cmp eax, dword [edi + 0x108]
jne 0x407c2f
movzx eax, word [ebp - 0x81a]
cmp eax, dword [edi + 0x10c]
jne 0x407c2f
movzx eax, word [ebp - 0x81c]
cmp eax, dword [edi + 0x110]
je 0x407cee
push dword [edi + 0x214]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
movzx edx, word [ebp - 0x816]
lea esi, [edi + 0x114]
movzx ecx, word [ebp - 0x81a]
movzx eax, word [ebp - 0x81c]
push edx
push ecx
push eax
mov dword [edi + 0x110], eax
lea eax, [edi + 8]
push eax
push str.._s_04d__02d__02d.txt
push esi
mov dword [edi + 0x108], edx
mov dword [edi + 0x10c], ecx
call dword [sym.imp.USER32.dll_wsprintfA]
add esp, 0x18
push 0
push 0x80
push 4
push 0
push 1
push 0x40000000
push esi
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov dword [edi + 0x214], eax
cmp eax, 0xffffffff
jne 0x407cb9
mov dword [edi + 4], 0
pop edi
pop esi
mov ecx, dword [ebp - 8]
xor ecx, ebp
call fcn.0040c166
mov esp, ebp
pop ebp
ret
push 2
push 0
push 0
push eax
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
cmp eax, 0xffffffff
jne 0x407cee
push dword [edi + 0x214]
mov dword [edi + 4], 0
call dword [sym.imp.KERNEL32.dll_CloseHandle]
pop edi
pop esi
mov ecx, dword [ebp - 8]
xor ecx, ebp
call fcn.0040c166
mov esp, ebp
pop ebp
ret
push 0x400
lea eax, [ebp - 0x80c]
push 0
push eax
call fcn.0040dfa0
add esp, 0xc
lea eax, [ebp + 0x14]
push eax
push 0
push dword [ebp + 0x10]
lea eax, [ebp - 0x80c]
push 0x400
push eax
call fcn.00407dc0
add esp, 0x14
lea eax, [ebp - 0x40c]
push 0x400
push 0
push eax
call fcn.0040dfa0
add esp, 0xc
lea eax, [ebp - 0x80c]
push eax
movzx eax, word [ebp - 0x810]
push eax
movzx eax, word [ebp - 0x812]
push eax
movzx eax, word [ebp - 0x814]
push eax
lea eax, [ebp - 0x40c]
push str._02d:_02d:_02d__s_r_n
push eax
call dword [sym.imp.USER32.dll_wsprintfA]
lea ecx, [ebp - 0x40c]
add esp, 0x18
lea edx, [ecx + 1]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x407d74
push 0
lea eax, [ebp - 0x820]
sub ecx, edx
push eax
push ecx
lea eax, [ebp - 0x40c]
push eax
push dword [edi + 0x214]
call dword [sym.imp.KERNEL32.dll_WriteFile]
mov ecx, dword [ebp - 8]
pop edi
xor ecx, ebp
pop esi
call fcn.0040c166
mov esp, ebp
pop ebp
ret
Function at 0x407e50
Capabilities:
Get file size
Read file on windows

Disassembly:
push ebp
mov ebp, esp
push ebx
push esi
push edi
push dword [ebp + 8]
mov esi, ecx
push 0x100
lea ebx, [esi + 0xc]
push ebx
call fcn.004106d3
add esp, 0xc
push 0
push 0x20
push 3
push 0
push 1
push closesocket
push ebx
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov edi, eax
cmp edi, 0xffffffff
jne 0x407ea8
push ebx
lea eax, [esi + 0x218]
push str.__s__Could_not_open_file
push eax
call dword [sym.imp.USER32.dll_wsprintfA]
add esp, 0xc
xor al, al
pop edi
pop esi
pop ebx
pop ebp
ret 4
push 0
push edi
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov dword [esi + 8], eax
mov eax, dword [esi + 4]
test eax, eax
je 0x407ecb
push eax
call fcn.0040c1a5
add esp, 4
mov dword [esi + 4], 0
push dword [esi + 8]
call fcn.0040c42b
add esp, 4
mov dword [esi + 4], eax
lea ecx, [ebp + 8]
mov dword [ebp + 8], 0
push 0
push ecx
push dword [esi + 8]
push eax
push edi
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
jne 0x407f1b
push ebx
lea eax, [esi + 0x218]
push str.__s__Could_not_read_file
push eax
call dword [sym.imp.USER32.dll_wsprintfA]
add esp, 0xc
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
pop edi
pop esi
xor al, al
pop ebx
pop ebp
ret 4
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov dword [esi + 0x10c], 0
call dword [sym.imp.KERNEL32.dll_GetTickCount]
pop edi
mov dword [esi + 0x214], eax
mov al, 1
pop esi
pop ebx
pop ebp
ret 4
Function at 0x409160
Capabilities:
Terminate thread

Disassembly:
push ebx
mov ebx, dword [sym.imp.KERNEL32.dll_CloseHandle]
push edi
mov edi, ecx
mov eax, dword [edi + 0x70]
test eax, eax
je 0x409186
push 0
push eax
call dword [sym.imp.KERNEL32.dll_TerminateThread]
push dword [edi + 0x70]
call ebx
mov dword [edi + 0x70], 0
mov eax, dword [edi + 0x6c]
test eax, eax
je 0x409197
push eax
call ebx
mov dword [edi + 0x6c], 0
push esi
lea ecx, [edi + 0x38]
call fcn.004088d0
lea esi, [edi + 0x14]
mov ebx, 8
mov eax, dword [esi]
test eax, eax
je 0x4091c5
push 0
push eax
call dword [sym.imp.KERNEL32.dll_TerminateThread]
push dword [esi]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov dword [esi], 0
add esi, 4
sub ebx, 1
jne 0x4091a8
mov eax, dword [edi + 0x10]
pop esi
test eax, eax
je 0x4091f1
push ebx
push eax
call dword [sym.imp.KERNEL32.dll_TerminateThread]
push dword [edi + 0x10]
mov ebx, dword [sym.imp.KERNEL32.dll_CloseHandle]
call ebx
mov dword [edi + 0x10], 0
jmp 0x4091f7
mov ebx, dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, dword [edi + 8]
test eax, eax
je 0x409208
push eax
call ebx
mov dword [edi + 8], 0
mov eax, dword [edi + 4]
cmp eax, 0xffffffff
je 0x40921e
push eax
call dword [sym.imp.WS2_32.dll_closesocket]
mov dword [edi + 4], 0xffffffff
pop edi
pop ebx
ret
Function at 0x409430
Capabilities:
Send data
Send data on socket

Disassembly:
push ebp
mov ebp, esp
sub esp, 8
push ebx
push esi
push edi
mov edi, dword [ebp + 8]
push 0x509978
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
test edi, edi
js 0x40959d
cmp edi, 0x190
jge 0x40959d
imul ecx, edi, 0x70
mov dword [ebp - 4], ecx
mov eax, dword [ecx + 0x50cf04]
test eax, eax
js 0x40959d
cmp eax, 0x190
jge 0x40959d
cmp dword [ecx + 0x50cf08], 0
je 0x40959d
cmp dword [ecx + 0x50cf1c], 0xffffffff
je 0x40959d
mov eax, dword [ebp + 0x10]
cmp eax, 0x2000
jle 0x4094b4
push eax
push edi
push str._SocketManager__Max_msg_size__Type:_1__Index:__d__Size:__d_
push 1
call fcn.0040a1d0
add esp, 0x10
jmp 0x40959d
mov ebx, dword [ecx + 0x50cf24]
cmp dword [ebx + 0x20], 0
jle 0x40951b
mov edx, dword [ebx + 0x12028]
lea ecx, [edx + eax]
cmp ecx, 0x10000
jle 0x4094e7
push ecx
push edi
push str._SocketManager__Max_msg_size__Type:_2__Index:__d__Size:__d_
push 1
call fcn.0040a1d0
add esp, 0x10
jmp 0x409592
push eax
push dword [ebp + 0xc]
lea eax, [ebx + 0x2028]
add eax, edx
push eax
call fcn.0040da20
mov ecx, dword [ebp + 0x10]
add esp, 0xc
add dword [ebx + 0x12028], ecx
push 0x509978
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov al, 1
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0xc
push eax
push dword [ebp + 0xc]
lea esi, [ebx + 0x24]
push esi
call fcn.0040da20
mov ecx, dword [ebp + 0x10]
lea eax, [ebx + 0x14]
add esp, 0xc
mov dword [eax], ecx
mov dword [ebx + 0x20], ecx
lea ecx, [ebp + 8]
mov dword [ebx + 0x18], esi
mov dword [ebx + 0x1c], 1
push 0
push ebx
push 0
push ecx
push 1
push eax
mov eax, dword [ebp - 4]
mov dword [ebx + 0x2024], 0
mov dword [ebp + 8], 0
push dword [eax + 0x50cf1c]
call dword [sym.imp.WS2_32.dll_WSASend]
cmp eax, 0xffffffff
jne 0x409505
mov esi, dword [sym.imp.WS2_32.dll_WSAGetLastError]
call esi
cmp eax, 0x3e5
je 0x409505
call esi
push eax
push str._SocketManager__WSASend___failed_with_error:__d
push 1
call fcn.0040a1d0
add esp, 0xc
push edi
mov ecx, 0x509900
call fcn.004095c0
push 0x509978
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
pop edi
pop esi
xor al, al
pop ebx
mov esp, ebp
pop ebp
ret 0xc
Function at 0x4097a0
Capabilities:
Send data
Send data on socket

Disassembly:
push ebp
mov ebp, esp
sub esp, 8
push ebx
mov ebx, dword [ebp + 8]
push esi
mov esi, ecx
push edi
mov dword [ebp - 4], esi
lea edi, [esi + 0x78]
push edi
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
test ebx, ebx
js 0x409930
cmp ebx, 0x190
jge 0x409930
mov eax, dword [ebp + 0xc]
test eax, eax
jne 0x4097dd
mov ecx, esi
jmp 0x40992a
mov esi, dword [ebp + 0x10]
imul ecx, ebx, 0x70
add dword [esi + 0x2024], eax
mov edx, dword [esi + 0x2024]
mov dword [ebp + 0xc], ecx
mov ecx, dword [esi + 0x20]
cmp edx, ecx
jl 0x4098c9
mov eax, dword [esi + 0x12028]
test eax, eax
jg 0x40981e
push edi
mov dword [esi + 0x20], 0
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0xc
lea edx, [esi + 0x2028]
lea ecx, [esi + 0x24]
cmp eax, 0x2000
jle 0x409893
push 0x2000
push edx
push ecx
call fcn.0040da20
lea eax, [esi + 0x24]
mov dword [esi + 0x14], 0x2000
mov dword [esi + 0x18], eax
add esp, 0xc
mov eax, dword [esi + 0x12028]
sub eax, 0x2000
mov dword [esi + 0x1c], 1
mov dword [esi + 0x20], 0x2000
push eax
lea eax, [esi + 0x4028]
mov dword [esi + 0x2024], 0
push eax
lea eax, [esi + 0x2028]
push eax
call fcn.0040da20
add esp, 0xc
lea eax, [esi + 0x14]
add dword [esi + 0x12028], 0xffffe000
jmp 0x4098df
push eax
push edx
push ecx
call fcn.0040da20
lea eax, [esi + 0x24]
mov dword [esi + 0x2024], 0
mov dword [esi + 0x18], eax
add esp, 0xc
mov eax, dword [esi + 0x12028]
mov dword [esi + 0x14], eax
mov dword [esi + 0x20], eax
lea eax, [esi + 0x14]
mov dword [esi + 0x12028], 0
jmp 0x4098d8
lea eax, [esi + 0x24]
add eax, edx
sub ecx, edx
mov dword [esi + 0x18], eax
lea eax, [esi + 0x14]
mov dword [eax], ecx
mov dword [esi + 0x1c], 1
push 0
push esi
push 0
lea ecx, [ebp + 8]
mov dword [ebp + 8], 0
push ecx
push 1
push eax
mov eax, dword [ebp + 0xc]
push dword [eax + 0x50cf1c]
call dword [sym.imp.WS2_32.dll_WSASend]
cmp eax, 0xffffffff
jne 0x409930
mov esi, dword [sym.imp.WS2_32.dll_WSAGetLastError]
call esi
cmp eax, 0x3e5
je 0x409930
call esi
push eax
push str._SocketManager__WSASend___failed_with_error:__d
push 1
call fcn.0040a1d0
mov ecx, dword [ebp - 4]
add esp, 0xc
push ebx
call fcn.004095c0
push edi
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0xc

Function at 0x40a110
Capabilities:
Terminate thread

Disassembly:
push ebp
mov ebp, esp
push esi
mov esi, ecx
mov eax, dword [esi + 0x18]
mov dword [esi], vtable.CSocketManagerUdp.0
test eax, eax
je 0x40a13c
push 0
push eax
call dword [sym.imp.KERNEL32.dll_TerminateThread]
push dword [esi + 0x18]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov dword [esi + 0x18], 0
mov eax, dword [esi + 4]
cmp eax, 0xffffffff
je 0x40a152
push eax
call dword [sym.imp.WS2_32.dll_closesocket]
mov dword [esi + 4], 0xffffffff
test byte [ebp + 8], 1
je 0x40a166
push 0x2024
push esi
call fcn.0040c174
add esp, 8
mov eax, esi
pop esi
pop ebp
ret 4
Function at 0x40a170
Capabilities:
Terminate process

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x104
mov eax, dword [0x43f014]
xor eax, ebp
mov dword [ebp - 4], eax
push 0x100
lea eax, [ebp - 0x104]
push 0
push eax
call fcn.0040dfa0
mov edx, dword [ebp + 8]
lea eax, [ebp + 0xc]
push eax
lea ecx, [ebp - 0x104]
call fcn.0040a330
add esp, 0x10
lea eax, [ebp - 0x104]
push 0x10
push str.Error
push eax
push 0
call dword [sym.imp.USER32.dll_MessageBoxA]
push 0
call dword [sym.imp.KERNEL32.dll_ExitProcess]

Function at 0x41c099
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 + 0x50c900]
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 0x41c0d9
cmp byte [ebx], 0xa
jne 0x41c0d9
or byte [eax + edi + 0x28], 4
jmp 0x41c0de
and byte [eax + edi + 0x28], 0xfb
add ecx, ebx
mov edx, ebx
mov dword [ebp - 0xc], ecx
mov esi, ebx
cmp ebx, ecx
jae 0x41c1dc
mov al, byte [edx]
cmp al, 0x1a
je 0x41c1be
lea ecx, [edx + 1]
mov dword [ebp - 8], ecx
mov ecx, dword [ebp - 0xc]
cmp al, 0xd
je 0x41c10d
mov edx, dword [ebp - 8]
mov byte [esi], al
jmp 0x41c132
mov eax, dword [ebp - 8]
cmp eax, ecx
jae 0x41c13c
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 0x41c0ef
jmp 0x41c1dc
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 0x41c1b9
cmp dword [ebp - 0xc], 0
je 0x41c1b9
mov ecx, dword [ebp - 0x10]
mov eax, dword [ecx*4 + 0x50c900]
test byte [eax + edi + 0x28], 0x48
je 0x41c193
mov dl, byte [ebp - 1]
lea eax, [esi + 1]
mov dword [ebp - 0x14], eax
cmp dl, 0xa
jne 0x41c17e
mov byte [esi], dl
jmp 0x41c18f
mov byte [esi], 0xd
mov eax, dword [ecx*4 + 0x50c900]
mov byte [eax + edi + 0x2a], dl
mov eax, dword [ebp - 0x14]
mov esi, eax
jmp 0x41c1dc
cmp byte [ebp - 1], 0xa
jne 0x41c1a2
cmp esi, ebx
jne 0x41c1a2
mov byte [esi], 0xa
jmp 0x41c1db
push 1
push 0xffffffffffffffff
push 0xffffffffffffffff
push dword [ebp + 8]
call fcn.004215b0
add esp, 0x10
cmp byte [ebp - 1], 0xa
je 0x41c1dc
mov byte [esi], 0xd
jmp 0x41c1db
mov ecx, dword [ebp - 0x10]
mov ecx, dword [ecx*4 + 0x50c900]
mov al, byte [ecx + edi + 0x28]
test al, 0x40
jne 0x41c1d8
or al, 2
mov byte [ecx + edi + 0x28], al
jmp 0x41c1dc
mov byte [esi], 0x1a
inc esi
sub esi, ebx
pop edi
mov eax, esi
pop esi
pop ebx
leave
ret
Function at 0x41c1e5
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 + 0x50c900]
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 0x41c228
cmp word [esi], dx
jne 0x41c228
or byte [edi + eax + 0x28], 4
jmp 0x41c22d
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 0x41c380
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 0x41c360
add eax, 2
cmp cx, word [ebp - 0xc]
je 0x41c26f
mov dword [ebp - 4], eax
mov word [esi], cx
jmp 0x41c2a5
cmp eax, edx
jae 0x41c2b1
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 0x41c247
jmp 0x41c380
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 0x41c35c
cmp dword [ebp - 0x14], 0
je 0x41c35c
mov eax, dword [ebx*4 + 0x50c900]
push 0xa
test byte [edi + eax + 0x28], 0x48
je 0x41c334
mov dx, word [ebp - 4]
lea eax, [esi + 2]
pop ecx
mov dword [ebp - 0x18], eax
cmp dx, cx
jne 0x41c2fd
mov word [esi], cx
jmp 0x41c330
push 0xd
pop eax
mov word [esi], ax
mov eax, dword [ebx*4 + 0x50c900]
movzx ecx, dx
shr ecx, 8
push 0xa
mov byte [edi + eax + 0x2a], dl
mov eax, dword [ebx*4 + 0x50c900]
mov byte [edi + eax + 0x2b], cl
mov eax, dword [ebx*4 + 0x50c900]
pop ecx
mov byte [edi + eax + 0x2c], cl
mov eax, dword [ebp - 0x18]
mov esi, eax
jmp 0x41c380
pop ebx
cmp word [ebp - 4], bx
jne 0x41c345
cmp esi, dword [ebp + 0xc]
jne 0x41c345
mov word [esi], bx
jmp 0x41c37d
push 1
push 0xffffffffffffffff
push 0xfffffffffffffffe
push dword [ebp + 8]
call fcn.004215b0
add esp, 0x10
cmp word [ebp - 4], bx
je 0x41c380
push 0xd
jmp 0x41c379
mov ecx, dword [ebx*4 + 0x50c900]
mov al, byte [ecx + edi + 0x28]
test al, 0x40
jne 0x41c377
or al, 2
mov byte [ecx + edi + 0x28], al
jmp 0x41c380
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 0x41cba1
Capabilities:
Read file on windows

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

Function at 0x41ebf0
Capabilities:
Allocate thread local storage

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
push esi
push 0x4320c0
push 0x4320b8
push str.FlsAlloc
push 0x1e
call fcn.0041ea5d
mov esi, eax
add esp, 0x10
test esi, esi
je 0x41ec24
push dword [ebp + 8]
mov ecx, esi
call dword [0x42e290]
call esi
jmp 0x41ec2a
call dword [sym.imp.KERNEL32.dll_TlsAlloc]
pop esi
pop ebp
ret 4

Function at 0x41ec6e
Capabilities:
Get thread local storage value

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
push esi
push 0x4320d0
push 0x4320c8
push str.FlsGetValue
push 0x20
call fcn.0041ea5d
mov esi, eax
add esp, 0x10
test esi, esi
je 0x41eca5
push dword [ebp + 8]
mov ecx, esi
call dword [0x42e290]
call esi
pop esi
pop ebp
ret 4
pop esi
pop ebp
jmp dword [sym.imp.KERNEL32.dll_TlsGetValue]
Function at 0x420f14
Capabilities:
Read file on windows

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
mov eax, 0x101c
call fcn.0040d0f0
mov eax, dword [0x43f014]
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.0041c072
pop ecx
mov ecx, dword [ebp + 8]
mov ebx, eax
cmp dword [ecx + 8], 0
jne 0x420f56
mov eax, dword [ebp + 0xc]
mov edx, dword [ebp + 0x10]
jmp 0x4210b2
mov eax, dword [ecx]
sub eax, dword [ecx + 4]
push esi
push edi
push 0
cdq
push 2
push edx
push eax
call fcn.0042c460
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 + 0x50c900]
push dword [edi + eax + 0x24]
push dword [edi + eax + 0x20]
push ebx
call fcn.00421592
mov ecx, dword [esi*4 + 0x50c900]
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 0x4210ab
cmp eax, dword [edi + ecx + 0x24]
jne 0x4210ab
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 0x4210ab
push dword [ebp - 0x100c]
push 0
push dword [ebp + 0x10]
push dword [ebp + 0xc]
push ebx
call fcn.00421592
add esp, 0x14
test edx, edx
jl 0x4210ab
jg 0x421021
test eax, eax
jb 0x4210ab
mov ebx, dword [ebp - 0x1018]
mov eax, dword [ebp - 0x1014]
test ebx, ebx
jg 0x4210ab
jl 0x42103b
cmp dword [ebp - 0x1008], eax
ja 0x4210ab
lea edi, [ebp - 0x1004]
xor edx, edx
add edi, eax
lea ecx, [ebp - 0x1004]
xor esi, esi
cmp dword [ebp - 0x1008], edx
jne 0x421059
test ebx, ebx
je 0x421092
cmp ecx, edi
jae 0x421092
mov al, byte [ecx]
cmp al, 0xd
jne 0x421073
lea eax, [edi - 1]
cmp ecx, eax
jae 0x42107f
cmp byte [ecx + 1], 0xa
jne 0x42107f
inc ecx
jmp 0x42107f
movzx eax, al
movsx eax, byte [eax + 0x43f190]
add ecx, eax
add esi, 1
adc edx, 0
inc ecx
cmp esi, dword [ebp - 0x1008]
jne 0x421059
cmp edx, ebx
jne 0x421059
lea eax, [ebp - 0x1004]
sub ecx, eax
mov eax, ecx
cdq
add eax, dword [ebp - 0x1010]
adc edx, dword [ebp - 0x101c]
jmp 0x4210b0
or edx, 0xffffffff
mov eax, edx
pop edi
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
pop ebx
call fcn.0040c166
leave
ret