Function at 0x403249
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x60
push esi
mov esi, dword [ebp + 8]
push edi
xor edi, edi
cmp esi, edi
mov dword [ebp - 4], edi
jne 0x403265
push 0xffffffffffffff9a
pop eax
jmp 0x40350b
mov eax, dword [esi + 0x14]
push ebx
add eax, dword [esi + 0xc]
push edi
push edi
push eax
push dword [esi]
call dword [sym.imp.KERNEL32.DLL_SetFilePointer]
or ebx, 0xffffffff
cmp eax, ebx
jne 0x403283
mov dword [ebp - 4], ebx
jmp 0x4032a4
lea eax, [ebp - 0xc]
push eax
push dword [esi]
call fcn.00402ed9
pop ecx
test eax, eax
pop ecx
jne 0x40327e
cmp dword [ebp - 0xc], 0x2014b50
je 0x4032a4
mov dword [ebp - 4], 0xffffff99
lea eax, [ebp - 0x60]
push eax
push dword [esi]
call fcn.00402e95
pop ecx
test eax, eax
pop ecx
je 0x4032b8
mov dword [ebp - 4], ebx
lea eax, [ebp - 0x5c]
push eax
push dword [esi]
call fcn.00402e95
pop ecx
test eax, eax
pop ecx
je 0x4032cc
mov dword [ebp - 4], ebx
lea eax, [ebp - 0x58]
push eax
push dword [esi]
call fcn.00402e95
pop ecx
test eax, eax
pop ecx
je 0x4032e0
mov dword [ebp - 4], ebx
lea eax, [ebp - 0x54]
push eax
push dword [esi]
call fcn.00402e95
pop ecx
test eax, eax
pop ecx
je 0x4032f4
mov dword [ebp - 4], ebx
lea eax, [ebp - 0x4c]
push eax
push dword [esi]
call fcn.00402ed9
pop ecx
test eax, eax
pop ecx
je 0x403308
mov dword [ebp - 4], ebx
lea eax, [ebp - 0x50]
push eax
push dword [esi]
call fcn.00402ed9
pop ecx
test eax, eax
pop ecx
je 0x40331c
mov dword [ebp - 4], ebx
lea eax, [ebp - 0x48]
push eax
push dword [esi]
call fcn.00402ed9
pop ecx
test eax, eax
pop ecx
je 0x403330
mov dword [ebp - 4], ebx
lea eax, [ebp - 0x44]
push eax
push dword [esi]
call fcn.00402ed9
pop ecx
test eax, eax
pop ecx
je 0x403344
mov dword [ebp - 4], ebx
lea eax, [ebp - 0x40]
push eax
push dword [esi]
call fcn.00402e95
pop ecx
test eax, eax
pop ecx
je 0x403358
mov dword [ebp - 4], ebx
lea eax, [ebp - 0x3c]
push eax
push dword [esi]
call fcn.00402e95
pop ecx
test eax, eax
pop ecx
je 0x40336c
mov dword [ebp - 4], ebx
lea eax, [ebp - 0x38]
push eax
push dword [esi]
call fcn.00402e95
pop ecx
test eax, eax
pop ecx
je 0x403380
mov dword [ebp - 4], ebx
lea eax, [ebp - 0x34]
push eax
push dword [esi]
call fcn.00402e95
pop ecx
test eax, eax
pop ecx
je 0x403394
mov dword [ebp - 4], ebx
lea eax, [ebp - 0x30]
push eax
push dword [esi]
call fcn.00402e95
pop ecx
test eax, eax
pop ecx
je 0x4033a8
mov dword [ebp - 4], ebx
lea eax, [ebp - 0x2c]
push eax
push dword [esi]
call fcn.00402ed9
pop ecx
test eax, eax
pop ecx
je 0x4033bc
mov dword [ebp - 4], ebx
lea eax, [ebp - 0x10]
push eax
push dword [esi]
call fcn.00402ed9
pop ecx
test eax, eax
pop ecx
je 0x4033d0
mov dword [ebp - 4], ebx
mov eax, dword [ebp - 0x40]
cmp dword [ebp - 4], edi
mov edx, eax
mov dword [ebp + 8], edx
jne 0x403489
mov ecx, dword [ebp + 0x14]
cmp ecx, edi
je 0x40342a
cmp eax, dword [ebp + 0x18]
jae 0x4033f8
and byte [eax + ecx], 0
mov eax, dword [ebp - 0x40]
mov edi, eax
jmp 0x4033fb
mov edi, dword [ebp + 0x18]
test eax, eax
jbe 0x40341c
cmp dword [ebp + 0x18], 0
jbe 0x40341c
lea eax, [ebp - 8]
push 0
push eax
push edi
push ecx
push dword [esi]
call dword [sym.imp.KERNEL32.DLL_ReadFile]
test eax, eax
jne 0x40341c
mov dword [ebp - 4], ebx
mov edx, dword [ebp + 8]
sub edx, edi
cmp dword [ebp - 4], 0
mov dword [ebp + 8], edx
jne 0x403489
cmp dword [ebp + 0x1c], 0
je 0x403489
mov edi, dword [ebp - 0x3c]
cmp edi, dword [ebp + 0x20]
jb 0x40343b
mov edi, dword [ebp + 0x20]
test edx, edx
je 0x403459
push 1
push 0
push edx
push dword [esi]
call dword [sym.imp.KERNEL32.DLL_SetFilePointer]
cmp eax, ebx
je 0x403456
and dword [ebp + 8], 0
jmp 0x403459
mov dword [ebp - 4], ebx
xor eax, eax
cmp dword [ebp - 0x3c], eax
jbe 0x40347d
cmp dword [ebp + 0x20], eax
jbe 0x40347d
push eax
lea eax, [ebp - 8]
push eax
push edi
push dword [ebp + 0x1c]
push dword [esi]
call dword [sym.imp.KERNEL32.DLL_ReadFile]
test eax, eax
jne 0x40347d
mov dword [ebp - 4], ebx
mov eax, dword [ebp - 0x3c]
mov edx, dword [ebp + 8]
sub eax, edi
add edx, eax
jmp 0x40348c
add edx, dword [ebp - 0x3c]
cmp dword [ebp - 4], 0
jne 0x403507
mov edi, dword [ebp + 0x24]
test edi, edi
je 0x4034ec
mov eax, dword [ebp - 0x38]
mov ebx, dword [ebp + 0x28]
cmp eax, ebx
jae 0x4034aa
and byte [eax + edi], 0
mov ebx, dword [ebp - 0x38]
test edx, edx
je 0x4034c3
push 1
push 0
push edx
push dword [esi]
call dword [sym.imp.KERNEL32.DLL_SetFilePointer]
cmp eax, 0xffffffff
jne 0x4034c3
or dword [ebp - 4], eax
xor eax, eax
cmp dword [ebp - 0x38], eax
jbe 0x4034e6
cmp dword [ebp + 0x28], eax
jbe 0x4034e6
push eax
lea eax, [ebp - 8]
push eax
push ebx
push edi
push dword [esi]
call dword [sym.imp.KERNEL32.DLL_ReadFile]
test eax, eax
jne 0x4034e6
or dword [ebp - 4], 0xffffffff
cmp dword [ebp - 4], 0
jne 0x403507
mov edi, dword [ebp + 0xc]
test edi, edi
je 0x4034fb
push 0x14
lea esi, [ebp - 0x60]
pop ecx
rep movsd dword es:[edi], dword [esi]
mov eax, dword [ebp + 0x10]
test eax, eax
je 0x403507
mov ecx, dword [ebp - 0x10]
mov dword [eax], ecx
mov eax, dword [ebp - 4]
pop ebx
pop edi
pop esi
leave
ret