Function at 0x436ec0
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x14
mov eax, dword [ebp + 0xc]
push ebx
push esi
mov esi, dword [ebp + 8]
mov dword [esp + 0x10], eax
mov eax, dword [esi + 0x10c]
test eax, eax
push edi
je 0x436efd
xor eax, eax
mov ax, word [esi + 0xfa]
shl eax, 4
push eax
push 0x40
mov dword [esp + 0x20], eax
call dword [sym.imp.KERNEL32.dll_GlobalAlloc]
mov ebx, eax
jmp 0x436f01
mov ebx, dword [esp + 0x18]
mov eax, dword [esi + 0x1a4]
test eax, eax
mov dword [esp + 0x10], 0
jle 0x4370f2
mov eax, dword [esi + 0x10c]
test eax, eax
je 0x436f53
mov edx, dword [esp + 0x18]
push 0
lea ecx, [esp + 0x20]
push ecx
push edx
push ebx
push eax
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
jne 0x436f4d
push ebx
call dword [sym.imp.KERNEL32.dll_GlobalFree]
mov eax, dword [esi + 0x10c]
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov dword [esi + 0x114], ebx
mov ecx, dword [esi + 0x114]
xor eax, eax
mov al, byte [ecx]
inc ecx
mov dword [esi + 0x114], ecx
cmp eax, 0x80
jne 0x436ff5
mov eax, dword [esi + 0x10c]
test eax, eax
je 0x436fad
push 1
push 0
push 0
push eax
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
mov edi, eax
cmp edi, 0xffffffff
jne 0x436fa1
push ebx
call dword [sym.imp.KERNEL32.dll_GlobalFree]
mov ecx, dword [esi + 0x10c]
push ecx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
sub edi, dword [esp + 0x18]
mov dword [esi + 0x118], edi
jmp 0x436fb4
dec ecx
mov dword [esi + 0x118], ecx
lea ecx, [esi + 0x148]
lea eax, [esi + 0x178]
mov edx, 2
mov edi, dword [eax - 0x20]
mov dword [eax], edi
mov edi, dword [eax - 0x1c]
mov dword [eax + 4], edi
mov edi, dword [eax - 0x10]
mov dword [eax + 0x10], edi
mov edi, dword [eax - 0xc]
mov dword [eax + 0x14], edi
mov edi, dword [ecx - 0x10]
mov dword [ecx], edi
mov edi, dword [ecx - 8]
mov dword [ecx + 8], edi
add eax, 8
add ecx, 4
dec edx
jne 0x436fc5
jmp 0x4370b4
cmp eax, 0xff
je 0x437007
cmp eax, 0x81
jne 0x4370b4
mov eax, dword [esi + 0x118]
test eax, eax
je 0x4370f2
mov edx, dword [esi + 0x1b0]
mov ecx, dword [esi + 0x1b4]
inc edx
mov eax, edx
cmp eax, ecx
mov dword [esi + 0x1b0], edx
je 0x4370b4
lea ecx, [esi + 0x148]
lea eax, [esi + 0x178]
mov edx, 2
mov edi, dword [eax]
mov dword [eax - 0x20], edi
mov edi, dword [eax + 4]
mov dword [eax - 0x1c], edi
mov edi, dword [eax]
mov dword [eax - 0x10], edi
mov edi, dword [eax + 4]
mov dword [eax - 0xc], edi
mov edi, dword [ecx]
mov dword [ecx - 0x10], edi
mov edi, dword [ecx]
mov dword [ecx - 8], edi
add eax, 8
add ecx, 4
dec edx
jne 0x437043
mov eax, dword [esi + 0x10c]
test eax, eax
je 0x4370a7
mov edx, dword [esi + 0x118]
push 0
push 0
push edx
push eax
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
cmp eax, 0xffffffff
jne 0x4370a1
push ebx
call dword [sym.imp.KERNEL32.dll_GlobalFree]
mov eax, dword [esi + 0x10c]
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
dec dword [esp + 0x10]
jmp 0x4370db
mov ecx, dword [esi + 0x118]
inc ecx
mov dword [esi + 0x114], ecx
mov eax, dword [esi + 0x134]
test eax, eax
push 0x1c
je 0x4370cd
lea edx, [esp + 0x18]
push edx
push esi
call fcn.004366b0
jmp 0x4370d8
lea eax, [esp + 0x18]
push eax
push esi
call fcn.00436a40
add esp, 0xc
mov eax, dword [esp + 0x10]
mov ecx, dword [esi + 0x1a4]
inc eax
cmp eax, ecx
mov dword [esp + 0x10], eax
jl 0x436f17
mov eax, dword [esi + 0x1a4]
mov ecx, dword [esp + 0x10]
cmp ecx, eax
jge 0x437138
sub eax, ecx
xor ecx, ecx
mov cx, word [esi + 0xfa]
mov edi, dword [esp + 0x14]
imul eax, ecx
lea ecx, [eax*8]
sub ecx, eax
shl ecx, 3
mov edx, ecx
shr ecx, 2
xor eax, eax
rep stosd dword es:[edi], eax
mov ecx, edx
and ecx, 3
rep stosb byte es:[edi], al
mov dword [esi + 0xec], 1
mov eax, dword [esi + 0x10c]
test eax, eax
je 0x437149
push ebx
call dword [sym.imp.KERNEL32.dll_GlobalFree]
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret