Function at 0x401100
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x18
push ebx
push esi
push edi
push 0
push 0
push 3
push 0
push 0
push 0x80000000
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov ebx, eax
cmp ebx, 0xffffffff
je 0x40136e
push 0x18
call dword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_malloc]
mov edi, eax
add esp, 4
test edi, edi
je 0x40136e
mov esi, dword [sym.imp.KERNEL32.dll_ReadFile]
lea eax, [ebp - 4]
push 0
push eax
push 2
push edi
push ebx
call esi
push 0
lea eax, [ebp - 4]
push eax
push 2
lea eax, [edi + 2]
push eax
push ebx
call esi
push 0
lea eax, [ebp - 4]
push eax
push 2
lea esi, [edi + 4]
push esi
push ebx
call dword [sym.imp.KERNEL32.dll_ReadFile]
movzx eax, word [esi]
shl eax, 4
add eax, 6
push eax
push edi
mov edi, dword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_realloc]
call edi
mov esi, eax
add esp, 8
mov dword [ebp - 0x14], esi
test esi, esi
je 0x40136e
movzx ecx, word [esi + 4]
lea eax, [ebp - 4]
push 0
push eax
shl ecx, 4
lea eax, [esi + 8]
push ecx
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_ReadFile]
push 0x14
call dword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_malloc]
mov edx, eax
add esp, 4
test edx, edx
je 0x40136e
movzx ecx, word [esi]
mov word [edx], cx
movzx ecx, word [esi + 2]
mov word [edx + 2], cx
movzx ecx, word [esi + 4]
mov word [edx + 4], cx
lea eax, [ecx*8]
sub eax, ecx
lea eax, [eax*2 + 6]
push eax
push edx
call edi
add esp, 8
mov dword [ebp - 0xc], eax
test eax, eax
je 0x40136e
xor ecx, ecx
xor edi, edi
cmp cx, word [eax + 4]
jae 0x40125b
lea edx, [esi + 9]
mov esi, eax
lea ecx, [eax + 7]
movzx eax, byte [edx - 1]
lea edx, [edx + 0x10]
mov byte [ecx - 1], al
lea ecx, [ecx + 0xe]
movzx eax, byte [edx - 0x10]
mov byte [ecx - 0xe], al
movzx eax, byte [edx - 0xf]
mov byte [ecx - 0xd], al
movzx eax, byte [edx - 0xe]
mov byte [ecx - 0xc], al
movzx eax, word [edx - 0xd]
mov word [ecx - 0xb], ax
movzx eax, word [edx - 0xb]
mov word [ecx - 9], ax
mov eax, dword [edx - 9]
mov dword [ecx - 7], eax
lea eax, [edi + 1]
mov word [ecx - 3], ax
inc edi
movzx eax, word [esi + 4]
cmp edi, eax
jl 0x401210
mov esi, dword [ebp - 0x14]
push 1
push dword [ebp + 0xc]
call dword [sym.imp.KERNEL32.dll_BeginUpdateResourceA]
mov edi, eax
mov dword [ebp - 0x18], edi
test edi, edi
je 0x401367
xor eax, eax
mov dword [ebp - 0x10], 0
cmp ax, word [esi + 4]
jae 0x401306
mov eax, dword [ebp - 0xc]
add eax, 0x12
add esi, 0x10
mov dword [ebp - 8], eax
push dword [esi]
call dword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_malloc]
mov edi, eax
add esp, 4
test edi, edi
je 0x401367
push 0
push 0
push dword [esi + 4]
push ebx
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
push 0
lea eax, [ebp - 4]
push eax
push dword [esi]
push edi
push ebx
call dword [sym.imp.KERNEL32.dll_ReadFile]
push dword [esi]
mov eax, dword [ebp - 8]
push edi
push 0
movzx eax, word [eax]
push eax
push 3
push dword [ebp - 0x18]
call dword [sym.imp.KERNEL32.dll_UpdateResourceA]
test eax, eax
je 0x40134d
push edi
call dword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
mov eax, dword [ebp - 0x14]
add esp, 4
mov ecx, dword [ebp - 0x10]
add esi, 0x10
add dword [ebp - 8], 0xe
inc ecx
mov dword [ebp - 0x10], ecx
movzx eax, word [eax + 4]
cmp ecx, eax
jl 0x401292
mov edi, dword [ebp - 0x18]
push ebx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov edx, dword [ebp - 0xc]
movzx ecx, word [edx + 4]
lea eax, [ecx*8]
sub eax, ecx
lea eax, [eax*2 + 6]
push eax
push edx
push 0
push 1
push 0xe
push edi
call dword [sym.imp.KERNEL32.dll_UpdateResourceA]
test eax, eax
je 0x40136e
push 0
push edi
call dword [sym.imp.KERNEL32.dll_EndUpdateResourceA]
neg eax
pop edi
sbb eax, eax
pop esi
neg eax
pop ebx
mov esp, ebp
pop ebp
ret
push ebx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push edi
call dword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
add esp, 4
xor eax, eax
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
push ebx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
pop edi
pop esi
xor eax, eax
pop ebx
mov esp, ebp
pop ebp
ret