Function at 0x405f95
Capabilities:
Read file on windows

Disassembly:
sub esp, 0xc
push ebx
push ebp
mov ebp, dword [esp + 0x24]
or ebx, 0xffffffff
push esi
xor eax, eax
mov dword [esp + 0xc], ebx
mov esi, eax
push edi
test ebp, ebp
je 0x405fce
cmp word [ebp], ax
je 0x405fce
push ebp
call fcn.0041bbf0
mov edi, dword [esp + 0x20]
mov ebp, eax
push ebp
push edi
call fcn.0042041f
pop ecx
pop ecx
mov esi, eax
jmp 0x405fe0
mov edi, dword [esp + 0x20]
cmp dword [edi + 0x10], eax
je 0x405fe2
mov ecx, dword [edi + 0x18]
mov eax, dword [edi + 0xc]
mov esi, dword [eax + ecx*4]
xor eax, eax
test esi, esi
je 0x406191
cmp dword [esp + 0x30], 0
je 0x406006
push dword [esi]
push eax
push dword [0x46c694]
call dword [sym.imp.KERNEL32.dll_HeapAlloc]
mov ebx, eax
mov eax, dword [esi]
jmp 0x40600e
mov eax, dword [esp + 0x28]
mov ebx, dword [esp + 0x24]
mov dword [esp + 0x14], eax
test ebx, ebx
je 0x406195
cdq
cmp edx, dword [esi + 4]
jl 0x406195
jg 0x40602e
cmp eax, dword [esi]
jb 0x406195
cmp dword [edi], 0
je 0x406044
push 0
lea eax, [esi + 0x14]
push eax
push dword [esi + 0x10]
push dword [edi]
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
mov edx, dword [esi + 8]
mov ecx, dword [esi]
mov eax, dword [edi]
cmp edx, ecx
jne 0x4060c6
mov edi, dword [esi + 0xc]
cmp edi, dword [esi + 4]
mov edi, dword [esp + 0x20]
jne 0x4060c6
test eax, eax
je 0x40608d
push 0
lea ecx, [esp + 0x30]
push ecx
push dword [esi]
push ebx
push eax
call dword [sym.imp.KERNEL32.dll_ReadFile]
mov edi, dword [esp + 0x2c]
mov eax, edi
cdq
cmp dword [esi], eax
jne 0x406195
cmp dword [esi + 4], edx
jne 0x406195
jmp 0x406117
add ecx, dword [esi + 0x10]
mov eax, dword [edi + 8]
mov dword [esp + 0x18], ecx
mov ecx, dword [esi + 0x14]
adc ecx, dword [esi + 4]
cdq
cmp ecx, edx
jg 0x406195
jl 0x4060b2
cmp dword [esp + 0x18], eax
ja 0x406195
push dword [esi]
mov eax, dword [edi + 4]
add eax, dword [esi + 0x10]
push eax
push ebx
call fcn.00419240
add esp, 0xc
jmp 0x406115
test eax, eax
jne 0x40611d
add edx, dword [esi + 0x10]
mov ecx, dword [esi + 0x14]
mov eax, dword [edi + 8]
adc ecx, dword [esi + 0xc]
mov dword [esp + 0x18], edx
cdq
cmp ecx, edx
jg 0x406195
jl 0x4060ef
cmp dword [esp + 0x18], eax
ja 0x406195
push dword [esp + 0x14]
mov eax, dword [edi + 4]
add eax, dword [esi + 0x10]
push ebx
push eax
call fcn.00420b1d
cdq
add esp, 0xc
cmp eax, dword [esi]
jne 0x406195
cmp edx, dword [esi + 4]
jne 0x406195
mov edi, dword [esi]
mov dword [esp + 0x10], edi
jmp 0x406199
push edx
push 0
push dword [0x46c694]
call dword [sym.imp.KERNEL32.dll_HeapAlloc]
mov dword [esp + 0x18], eax
test eax, eax
je 0x406195
push 0
lea ecx, [esp + 0x30]
push ecx
push dword [esi + 8]
push eax
push dword [edi]
call dword [sym.imp.KERNEL32.dll_ReadFile]
mov eax, dword [esp + 0x2c]
cdq
cmp dword [esi + 8], eax
jne 0x406179
cmp dword [esi + 0xc], edx
jne 0x406179
push dword [esp + 0x14]
push ebx
push dword [esp + 0x20]
call fcn.00420b1d
cdq
add esp, 0xc
cmp eax, dword [esi]
jne 0x406179
cmp edx, dword [esi + 4]
jne 0x406179
mov edi, dword [esi]
mov dword [esp + 0x10], edi
jmp 0x40617d
mov edi, dword [esp + 0x10]
push dword [esp + 0x18]
push 0
push dword [0x46c694]
call dword [sym.imp.KERNEL32.dll_HeapFree]
jmp 0x406199
mov ebx, dword [esp + 0x24]
mov edi, dword [esp + 0x10]
mov ecx, dword [esp + 0x30]
test ecx, ecx
je 0x4061c5
cmp edi, 0xffffffff
jne 0x4061bf
test ebx, ebx
je 0x4061b9
push ebx
push 0
push dword [0x46c694]
call dword [sym.imp.KERNEL32.dll_HeapFree]
xor eax, eax
mov ebx, eax
jmp 0x4061cb
mov eax, dword [esi]
mov dword [ecx], eax
jmp 0x4061c9
mov ebx, dword [esp + 0x10]
xor eax, eax
test ebp, ebp
je 0x4061db
cmp word [ebp], ax
je 0x4061db
push ebp
call fcn.0041baf0
pop edi
pop esi
pop ebp
mov eax, ebx
pop ebx
add esp, 0xc
ret