Function at 0x404f8d
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x30
push ebx
mov ebx, dword [ebp + 0x14]
push esi
mov eax, ebx
push edi
lea ecx, [eax + 2]
mov dx, word [eax]
add eax, 2
test dx, dx
jne 0x404f9e
sub eax, ecx
mov ecx, dword [ebp + 0x10]
sar eax, 1
lea eax, [ecx + eax*2 + 2]
mov esi, 0x13ea8
xor edx, edx
mov ecx, esi
mov dword [ebp - 0x20], eax
div ecx
xor ecx, ecx
movzx eax, ax
mov dword [ebp - 0xc], eax
cmp edx, ecx
je 0x404fd1
inc dword [ebp - 0xc]
mov eax, dword [ebp + 0x18]
mov edx, dword [eax + 0xc]
mov eax, dword [eax + 0x24]
push ecx
push ecx
push 3
push ecx
xor edi, edi
inc edi
push edi
push 0x80000000
push dword [ebp + 0xc]
mov dword [ebp - 0x28], edx
mov dword [ebp - 0x24], eax
call dword [sym.imp.KERNEL32.DLL_CreateFileW]
mov dword [ebp - 0x18], eax
cmp eax, 0xffffffff
jne 0x405006
mov esi, edi
jmp 0x405341
push 0x14000
call fcn.0040ae5e
pop ecx
mov dword [ebp - 4], eax
test eax, eax
jne 0x40501f
mov esi, edi
jmp 0x405332
and dword [ebp - 8], 0
cmp word [ebp - 0xc], di
jne 0x4050e6
lea esi, [eax + 0x144]
mov eax, ebx
lea ecx, [eax + 2]
mov dx, word [eax]
add eax, 2
test dx, dx
jne 0x405038
sub eax, ecx
sar eax, 1
lea eax, [eax + eax + 2]
push eax
push ebx
push esi
call fcn.0040fe40
mov eax, ebx
add esp, 0xc
lea ecx, [eax + 2]
mov dx, word [eax]
add eax, 2
test dx, dx
jne 0x40505b
sub eax, ecx
sar eax, 1
mov ecx, eax
mov eax, ebx
lea edx, [eax + 2]
mov bx, word [eax]
add eax, 2
test bx, bx
jne 0x405071
sub eax, edx
sar eax, 1
push 0
mov ebx, eax
lea eax, [ebp - 0x14]
push eax
push dword [ebp + 0x10]
lea eax, [esi + ecx*2 + 2]
push eax
push dword [ebp - 0x18]
call dword [sym.imp.KERNEL32.DLL_ReadFile]
test eax, eax
je 0x4050bd
mov eax, dword [ebp - 0x14]
mov ecx, dword [ebp - 4]
lea eax, [eax + ebx*2 + 2]
push eax
push edi
push edi
push edi
push dword [ebp + 0x18]
lea ebx, [ebp + 0x10]
call fcn.00404b4d
add esp, 0x14
test eax, eax
jne 0x4050c4
mov esi, edi
jmp 0x405329
cmp dword [ebp + 8], 0
je 0x4050da
push dword [ebp + 0x10]
push dword [ebp - 4]
call fcn.00403ea8
pop ecx
pop ecx
mov dword [ebp - 8], eax
push dword [ebp + 0x10]
push dword [ebp - 4]
push edi
jmp 0x405317
mov eax, ebx
lea ecx, [eax + 2]
mov dx, word [eax]
add eax, 2
test dx, dx
jne 0x4050eb
mov edi, dword [ebp - 4]
sub eax, ecx
sar eax, 1
lea eax, [eax + eax + 2]
push eax
lea eax, [edi + 0x144]
push ebx
push eax
call fcn.0040fe40
mov eax, ebx
add esp, 0xc
lea ecx, [eax + 2]
mov dx, word [eax]
add eax, 2
test dx, dx
jne 0x405117
sub eax, ecx
sar eax, 1
mov ecx, eax
mov eax, ebx
lea edx, [eax + 2]
mov bx, word [eax]
add eax, 2
test bx, bx
jne 0x40512d
sub eax, edx
push 0
lea edx, [ebp - 0x14]
push edx
sar eax, 1
mov ebx, 0x9f53
mov edx, ebx
sub edx, eax
add edx, edx
push edx
lea eax, [edi + ecx*2 + 0x146]
mov edi, dword [sym.imp.KERNEL32.DLL_ReadFile]
push eax
push dword [ebp - 0x18]
call edi
test eax, eax
je 0x4052c6
mov eax, dword [ebp + 0x14]
lea edx, [eax + 2]
mov cx, word [eax]
add eax, 2
test cx, cx
jne 0x40516f
sub eax, edx
sar eax, 1
sub ebx, eax
add ebx, ebx
cmp dword [ebp - 0x14], ebx
jb 0x4052c6
mov eax, dword [ebp - 0x20]
mov ecx, dword [ebp - 4]
push esi
push 1
push dword [ebp - 0xc]
add eax, 0xfffec158
push 1
push dword [ebp + 0x18]
lea ebx, [ebp + 0x10]
mov dword [ebp - 0x20], eax
call fcn.00404b4d
add esp, 0x14
test eax, eax
je 0x4052c6
cmp dword [ebp + 8], 0
je 0x4051cd
push dword [ebp + 0x10]
push dword [ebp - 4]
call fcn.00403ea8
pop ecx
pop ecx
mov dword [ebp - 8], eax
push dword [ebp + 0x10]
lea eax, [ebp - 0x24]
push dword [ebp - 4]
lea ecx, [ebp - 0x28]
push 1
push eax
call fcn.004049b4
add esp, 0x10
mov dword [ebp - 0x1c], eax
movzx eax, word [ebp - 0xc]
push 2
pop ecx
dec eax
mov dword [ebp - 0x10], ecx
mov dword [ebp - 0x2c], eax
cmp eax, ecx
jl 0x40529f
xor eax, eax
cmp dword [ebp - 8], eax
je 0x40520d
cmp dword [ebp - 0x1c], eax
je 0x40529f
push eax
lea eax, [ebp - 0x14]
push eax
mov eax, dword [ebp - 4]
push esi
add eax, 0x144
push eax
push dword [ebp - 0x18]
call edi
test eax, eax
je 0x4052c6
cmp dword [ebp - 0x14], esi
jb 0x4052c6
mov ecx, dword [ebp - 4]
sub dword [ebp - 0x20], esi
push esi
push dword [ebp - 0x10]
lea ebx, [ebp + 0x10]
push dword [ebp - 0xc]
push 1
push dword [ebp + 0x18]
call fcn.00404b4d
add esp, 0x14
test eax, eax
je 0x4052c6
xor ebx, ebx
cmp dword [ebp + 8], ebx
je 0x40526f
cmp dword [ebp - 8], ebx
jne 0x40526f
push dword [ebp + 0x10]
push dword [ebp - 4]
call fcn.00403ea8
pop ecx
pop ecx
mov dword [ebp - 8], eax
cmp dword [ebp - 0x1c], ebx
je 0x40528f
push dword [ebp + 0x10]
lea eax, [ebp - 0x24]
push dword [ebp - 4]
lea ecx, [ebp - 0x28]
push dword [ebp - 0x10]
push eax
call fcn.004049b4
add esp, 0x10
mov dword [ebp - 0x1c], eax
inc dword [ebp - 0x10]
movzx eax, word [ebp - 0x10]
cmp eax, dword [ebp - 0x2c]
jle 0x4051fd
cmp dword [ebp - 8], 0
je 0x4052ab
cmp dword [ebp - 0x1c], 1
jne 0x405326
push 0
lea eax, [ebp - 0x14]
push eax
push dword [ebp - 0x20]
mov eax, dword [ebp - 4]
add eax, 0x144
push eax
push dword [ebp - 0x18]
call edi
test eax, eax
jne 0x4052ca
xor esi, esi
jmp 0x4052ec
push dword [ebp - 0x20]
mov ecx, dword [ebp - 4]
push dword [ebp - 0x10]
lea ebx, [ebp + 0x10]
push dword [ebp - 0xc]
push 1
push dword [ebp + 0x18]
call fcn.00404b4d
add esp, 0x14
xor esi, esi
test eax, eax
jne 0x4052ef
inc esi
jmp 0x405329
cmp dword [ebp + 8], esi
je 0x405309
cmp dword [ebp - 8], esi
jne 0x405309
push dword [ebp + 0x10]
push dword [ebp - 4]
call fcn.00403ea8
pop ecx
pop ecx
mov dword [ebp - 8], eax
cmp dword [ebp - 0x1c], esi
je 0x405326
push dword [ebp + 0x10]
push dword [ebp - 4]
push dword [ebp - 0x10]
lea eax, [ebp - 0x24]
push eax
lea ecx, [ebp - 0x28]
call fcn.004049b4
add esp, 0x10
mov esi, dword [ebp - 8]
push dword [ebp - 4]
call fcn.0040aef2
pop ecx
cmp dword [ebp - 0x18], 0
je 0x405341
push dword [ebp - 0x18]
call dword [sym.imp.KERNEL32.DLL_CloseHandle]
pop edi
mov eax, esi
pop esi
pop ebx
leave
ret