Function at 0x47e708
Capabilities:
Get file size
Read file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x84
mov dword [ebp - 0xc], 0x4e3718
mov eax, dword [ebp - 0xc]
mov ecx, dword [eax]
push ecx
call dword [sym.imp.kernel32.dll_GetModuleHandleW]
mov dword [ebp - 0x4c], eax
push 4
push 0x1000
mov edx, dword [ebp - 0xc]
mov eax, dword [edx + 0x38]
push eax
push 0
call dword [sym.imp.kernel32.dll_VirtualAlloc]
mov dword [ebp - 0x14], eax
mov ecx, dword [ebp - 0xc]
mov edx, dword [ecx + 0x38]
push edx
mov eax, dword [ebp - 0x14]
push eax
call fcn.0047e678
add esp, 8
push 0x104
mov ecx, dword [ebp - 0x14]
push ecx
push 0
call dword [sym.imp.kernel32.dll_GetModuleFileNameW]
mov edx, dword [ebp - 0xc]
mov eax, dword [edx + 0x44]
mov dword [ebp - 0x44], eax
mov dword [ebp - 0x1c], 0
mov ecx, dword [ebp - 0x1c]
mov edx, dword [ebp - 0x14]
movzx eax, word [edx + ecx*2]
test eax, eax
je 0x47e78d
mov ecx, dword [ebp - 0x1c]
add ecx, 1
mov dword [ebp - 0x1c], ecx
jmp 0x47e774
mov edx, dword [ebp - 0x1c]
mov dword [ebp - 0x10], edx
mov eax, dword [ebp - 0x10]
mov ecx, dword [ebp - 0x14]
movzx edx, word [ecx + eax*2 - 2]
cmp edx, 0x5c
je 0x47e7ba
xor eax, eax
mov ecx, dword [ebp - 0x10]
mov edx, dword [ebp - 0x14]
mov word [edx + ecx*2], ax
mov eax, dword [ebp - 0x10]
sub eax, 1
mov dword [ebp - 0x10], eax
jmp 0x47e793
mov dword [ebp - 0x20], 0
mov ecx, dword [ebp - 0x44]
add ecx, dword [ebp - 0x20]
movsx edx, byte [ecx]
test edx, edx
je 0x47e7f6
mov eax, dword [ebp - 0x44]
add eax, dword [ebp - 0x20]
movsx cx, byte [eax]
mov edx, dword [ebp - 0x10]
mov eax, dword [ebp - 0x14]
mov word [eax + edx*2], cx
mov ecx, dword [ebp - 0x10]
add ecx, 1
mov dword [ebp - 0x10], ecx
mov edx, dword [ebp - 0x20]
add edx, 1
mov dword [ebp - 0x20], edx
jmp 0x47e7c1
push 0
push 0x80
push 3
push 0
push 1
push 1
mov eax, dword [ebp - 0x14]
push eax
call dword [sym.imp.kernel32.dll_CreateFileW]
mov dword [ebp - 0x30], eax
cmp dword [ebp - 0x30], 0xffffffff
jne 0x47e81d
jmp 0x47ea59
push 0
mov ecx, dword [ebp - 0x30]
push ecx
call dword [sym.imp.kernel32.dll_GetFileSize]
mov dword [ebp - 0x5c], eax
push 4
push 0x1000
mov edx, dword [ebp - 0xc]
mov eax, dword [edx + 0x34]
push eax
push 0
call dword [sym.imp.kernel32.dll_VirtualAlloc]
mov dword [ebp - 4], eax
mov dword [ebp - 0x48], 0
push 0
lea ecx, [ebp - 0x48]
push ecx
mov edx, dword [ebp - 0x5c]
push edx
mov eax, dword [ebp - 4]
push eax
mov ecx, dword [ebp - 0x30]
push ecx
call dword [sym.imp.kernel32.dll_ReadFile]
test eax, eax
jne 0x47e86d
jmp 0x47ea59
mov edx, dword [ebp - 4]
add edx, dword [ebp - 0x48]
mov dword [ebp - 0x40], edx
mov eax, dword [ebp - 0xc]
mov ecx, dword [eax + 0x30]
add ecx, dword [ebp - 4]
mov dword [ebp - 4], ecx
mov edx, dword [ebp - 4]
mov dword [ebp - 8], edx
mov eax, dword [ebp - 8]
mov ecx, dword [eax]
mov dword [ebp - 0x60], ecx
mov edx, dword [ebp - 8]
add edx, 4
mov dword [ebp - 8], edx
mov eax, dword [ebp - 8]
mov ecx, dword [eax]
mov dword [ebp - 0x64], ecx
mov edx, dword [ebp - 8]
add edx, 4
mov dword [ebp - 8], edx
mov dword [ebp - 0x34], 0
jmp 0x47e8c5
mov eax, dword [ebp - 0x34]
add eax, 1
mov dword [ebp - 0x34], eax
mov ecx, dword [ebp - 8]
add ecx, 4
mov dword [ebp - 8], ecx
mov edx, dword [ebp - 0x34]
cmp edx, dword [ebp - 0x60]
jae 0x47e8dc
mov eax, dword [ebp - 8]
mov ecx, dword [eax]
add ecx, dword [ebp - 0x64]
mov edx, dword [ebp - 8]
mov dword [edx], ecx
jmp 0x47e8b3
mov eax, dword [ebp - 0xc]
mov ecx, dword [eax + 8]
add ecx, dword [ebp - 4]
mov dword [ebp - 4], ecx
mov edx, dword [ebp - 4]
add edx, 1
push edx
mov eax, dword [ebp - 0x4c]
push eax
call dword [sym.imp.kernel32.dll_GetProcAddress]
mov dword [ebp - 0x50], eax
cmp dword [ebp - 0x50], 0
jne 0x47e907
jmp 0x47ea59
mov ecx, dword [ebp - 4]
movsx edx, byte [ecx]
add edx, dword [ebp - 4]
mov dword [ebp - 4], edx
mov eax, dword [ebp - 4]
add eax, 1
push eax
mov ecx, dword [ebp - 0x4c]
push ecx
call dword [sym.imp.kernel32.dll_GetProcAddress]
mov dword [ebp - 0x3c], eax
cmp dword [ebp - 0x3c], 0
jne 0x47e932
jmp 0x47ea59
mov edx, dword [ebp - 4]
movsx eax, byte [edx]
add eax, dword [ebp - 4]
mov dword [ebp - 4], eax
mov ecx, dword [ebp - 4]
add ecx, 1
push ecx
call dword [ebp - 0x50]
mov dword [ebp - 0x24], eax
cmp dword [ebp - 0x24], 0
jne 0x47e956
jmp 0x47ea59
mov edx, dword [ebp - 4]
movsx eax, byte [edx]
add eax, dword [ebp - 4]
mov dword [ebp - 4], eax
mov ecx, dword [ebp - 4]
add ecx, 0xc
mov dword [ebp - 0x58], ecx
mov edx, dword [ebp - 4]
mov dword [ebp - 0x54], edx
mov eax, dword [ebp - 0x54]
mov ecx, dword [eax + 4]
mov dword [ebp - 0x6c], ecx
mov edx, dword [ebp - 0x54]
mov eax, dword [edx + 8]
mov dword [ebp - 0x28], eax
mov ecx, dword [ebp - 0x58]
add ecx, dword [ebp - 0x28]
mov dword [ebp - 0x70], ecx
mov edx, dword [ebp - 0x24]
mov eax, dword [ebp - 0x24]
add eax, dword [edx + 0x3c]
mov dword [ebp - 0x68], eax
mov ecx, dword [ebp - 0x68]
mov edx, dword [ebp - 0x24]
add edx, dword [ecx + 0x2c]
mov dword [ebp - 0x2c], edx
mov dword [ebp - 0x38], 0
lea eax, [ebp - 0x38]
push eax
push 0x40
mov ecx, dword [ebp - 0x28]
push ecx
mov edx, dword [ebp - 0x2c]
push edx
call dword [ebp - 0x3c]
mov eax, dword [ebp - 0x28]
push eax
mov ecx, dword [ebp - 0x58]
push ecx
mov edx, dword [ebp - 0x2c]
push edx
call fcn.0047e6b8
add esp, 0xc
lea eax, [ebp - 0x38]
push eax
mov ecx, dword [ebp - 0x38]
push ecx
mov edx, dword [ebp - 0x28]
push edx
mov eax, dword [ebp - 0x2c]
push eax
call dword [ebp - 0x3c]
mov ecx, dword [ebp - 0x2c]
add ecx, dword [ebp - 0x6c]
mov dword [ebp - 0x74], ecx
mov dword [ebp - 0x18], 0
mov edx, dword [ebp - 0xc]
mov eax, dword [edx + 0x24]
mov ecx, dword [ebp - 0x18]
movsx edx, byte [eax + ecx]
test edx, edx
je 0x47ea27
mov eax, dword [ebp - 0xc]
mov ecx, dword [eax + 0x24]
mov edx, dword [ebp - 0x18]
movsx ax, byte [ecx + edx]
mov ecx, dword [ebp - 0x18]
mov edx, dword [ebp - 0x40]
mov word [edx + ecx*2], ax
mov eax, dword [ebp - 0x18]
add eax, 1
mov dword [ebp - 0x18], eax
jmp 0x47e9f3
xor ecx, ecx
mov edx, dword [ebp - 0x18]
mov eax, dword [ebp - 0x40]
mov word [eax + edx*2], cx
mov ecx, dword [ebp - 0x40]
mov dword [ebp - 0x80], ecx
mov edx, dword [ebp - 0x70]
mov dword [ebp - 0x84], edx
mov byte [ebp - 0x7c], 1
mov eax, dword [ebp - 0x74]
mov dword [ebp - 0x78], eax
lea ecx, [ebp - 0x84]
push ecx
call dword [ebp - 0x78]
add esp, 4
mov esp, ebp
pop ebp
ret