Function at 0x40304c
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x58
push ebx
push esi
mov esi, dword [ebp + 8]
xor ebx, ebx
cmp esi, ebx
mov dword [ebp - 4], ebx
jne 0x403068
push 0xffffffffffffff9a
pop eax
jmp 0x403330
mov eax, dword [esi + 0xc]
push edi
add eax, dword [esi + 0x14]
push ebx
push eax
push dword [esi]
call sub.MSVCRT.dll_fseek
add esp, 0xc
test eax, eax
je 0x403087
or edi, 0xffffffff
mov dword [ebp - 4], edi
jmp 0x40308a
or edi, 0xffffffff
cmp dword [ebp - 4], ebx
jne 0x4030b5
lea eax, [ebp + 8]
push eax
push dword [esi]
call fcn.00402e6a
pop ecx
test eax, eax
pop ecx
je 0x4030a5
mov dword [ebp - 4], edi
jmp 0x4030b5
cmp dword [ebp + 8], 0x2014b50
je 0x4030b5
mov dword [ebp - 4], 0xffffff99
lea eax, [ebp - 0x58]
push eax
push dword [esi]
call fcn.00402df0
pop ecx
test eax, eax
pop ecx
je 0x4030c9
mov dword [ebp - 4], edi
lea eax, [ebp - 0x54]
push eax
push dword [esi]
call fcn.00402df0
pop ecx
test eax, eax
pop ecx
je 0x4030dd
mov dword [ebp - 4], edi
lea eax, [ebp - 0x50]
push eax
push dword [esi]
call fcn.00402df0
pop ecx
test eax, eax
pop ecx
je 0x4030f1
mov dword [ebp - 4], edi
lea eax, [ebp - 0x4c]
push eax
push dword [esi]
call fcn.00402df0
pop ecx
test eax, eax
pop ecx
je 0x403105
mov dword [ebp - 4], edi
lea eax, [ebp - 0x48]
push eax
push dword [esi]
call fcn.00402e6a
pop ecx
test eax, eax
pop ecx
je 0x403119
mov dword [ebp - 4], edi
lea eax, [ebp - 0x20]
push eax
push dword [ebp - 0x48]
call fcn.00403334
pop ecx
lea eax, [ebp - 0x44]
pop ecx
push eax
push dword [esi]
call fcn.00402e6a
pop ecx
test eax, eax
pop ecx
je 0x40313b
mov dword [ebp - 4], edi
lea eax, [ebp - 0x40]
push eax
push dword [esi]
call fcn.00402e6a
pop ecx
test eax, eax
pop ecx
je 0x40314f
mov dword [ebp - 4], edi
lea eax, [ebp - 0x3c]
push eax
push dword [esi]
call fcn.00402e6a
pop ecx
test eax, eax
pop ecx
je 0x403163
mov dword [ebp - 4], edi
lea eax, [ebp - 0x38]
push eax
push dword [esi]
call fcn.00402df0
pop ecx
test eax, eax
pop ecx
je 0x403177
mov dword [ebp - 4], edi
lea eax, [ebp - 0x34]
push eax
push dword [esi]
call fcn.00402df0
pop ecx
test eax, eax
pop ecx
je 0x40318b
mov dword [ebp - 4], edi
lea eax, [ebp - 0x30]
push eax
push dword [esi]
call fcn.00402df0
pop ecx
test eax, eax
pop ecx
je 0x40319f
mov dword [ebp - 4], edi
lea eax, [ebp - 0x2c]
push eax
push dword [esi]
call fcn.00402df0
pop ecx
test eax, eax
pop ecx
je 0x4031b3
mov dword [ebp - 4], edi
lea eax, [ebp - 0x28]
push eax
push dword [esi]
call fcn.00402df0
pop ecx
test eax, eax
pop ecx
je 0x4031c7
mov dword [ebp - 4], edi
lea eax, [ebp - 0x24]
push eax
push dword [esi]
call fcn.00402e6a
pop ecx
test eax, eax
pop ecx
je 0x4031db
mov dword [ebp - 4], edi
lea eax, [ebp - 8]
push eax
push dword [esi]
call fcn.00402e6a
pop ecx
test eax, eax
pop ecx
je 0x4031ef
mov dword [ebp - 4], edi
mov eax, dword [ebp - 0x38]
cmp dword [ebp - 4], 0
mov ebx, eax
jne 0x4032a1
mov ecx, dword [ebp + 0x14]
test ecx, ecx
je 0x40323b
cmp eax, dword [ebp + 0x18]
jae 0x403215
and byte [eax + ecx], 0
mov eax, dword [ebp - 0x38]
mov edi, eax
jmp 0x403218
mov edi, dword [ebp + 0x18]
test eax, eax
jbe 0x403239
cmp dword [ebp + 0x18], 0
jbe 0x403239
push dword [esi]
push 1
push edi
push ecx
call sub.MSVCRT.dll_fread
add esp, 0x10
cmp eax, 1
je 0x403239
or dword [ebp - 4], 0xffffffff
sub ebx, edi
cmp dword [ebp - 4], 0
jne 0x4032a1
cmp dword [ebp + 0x1c], 0
je 0x4032a1
mov edi, dword [ebp - 0x34]
cmp edi, dword [ebp + 0x20]
jb 0x403252
mov edi, dword [ebp + 0x20]
test ebx, ebx
je 0x403273
push 1
push ebx
push dword [esi]
call sub.MSVCRT.dll_fseek
add esp, 0xc
test eax, eax
jne 0x40326f
and dword [ebp + 0x18], eax
mov ebx, dword [ebp + 0x18]
jmp 0x403273
or dword [ebp - 4], 0xffffffff
cmp dword [ebp - 0x34], 0
jbe 0x403298
cmp dword [ebp + 0x20], 0
jbe 0x403298
push dword [esi]
push 1
push edi
push dword [ebp + 0x1c]
call sub.MSVCRT.dll_fread
add esp, 0x10
cmp eax, 1
je 0x403298
or dword [ebp - 4], 0xffffffff
mov eax, dword [ebp - 0x34]
sub eax, edi
add ebx, eax
jmp 0x4032a4
add ebx, dword [ebp - 0x34]
cmp dword [ebp - 4], 0
mov dword [ebp + 0x18], ebx
jne 0x40332c
mov edi, dword [ebp + 0x24]
test edi, edi
je 0x403305
mov eax, dword [ebp - 0x30]
mov ebx, dword [ebp + 0x28]
cmp eax, ebx
jae 0x4032c5
and byte [eax + edi], 0
mov ebx, dword [ebp - 0x30]
cmp dword [ebp + 0x18], 0
je 0x4032e2
push 1
push dword [ebp + 0x18]
push dword [esi]
call sub.MSVCRT.dll_fseek
add esp, 0xc
test eax, eax
je 0x4032e2
or dword [ebp - 4], 0xffffffff
cmp dword [ebp - 0x30], 0
jbe 0x403305
cmp dword [ebp + 0x28], 0
jbe 0x403305
push dword [esi]
push 1
push ebx
push edi
call sub.MSVCRT.dll_fread
add esp, 0x10
cmp eax, 1
je 0x403305
or dword [ebp - 4], 0xffffffff
cmp dword [ebp - 4], 0
jne 0x40332c
mov edi, dword [ebp + 0xc]
test edi, edi
je 0x40331a
push 0x14
lea esi, [ebp - 0x58]
pop ecx
rep movsd dword es:[edi], dword [esi]
cmp dword [ebp - 4], 0
jne 0x40332c
mov eax, dword [ebp + 0x10]
test eax, eax
je 0x40332c
mov ecx, dword [ebp - 8]
mov dword [eax], ecx
mov eax, dword [ebp - 4]
pop edi
pop esi
pop ebx
leave
ret