Function at 0x402350
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
mov eax, 0x1404
call fcn.0040cf30
push ebx
push esi
mov esi, dword [ebp + 8]
push edi
push 0x8000
push esi
call dword [sym.imp.MSVCRT.dll__fileno]
mov ebx, dword [sym.imp.MSVCRT.dll__setmode]
add esp, 4
push eax
call ebx
add esp, 8
cmp eax, 0xffffffff
jne 0x40238b
call fcn.00402890
mov edi, dword [ebp + 0xc]
push 0x8000
push edi
call dword [sym.imp.MSVCRT.dll__fileno]
add esp, 4
push eax
call ebx
add esp, 8
cmp eax, 0xffffffff
jne 0x4023ad
call fcn.00402890
test byte [esi + 0xc], 0x20
jne 0x402597
test byte [edi + 0xc], 0x20
jne 0x402597
mov eax, dword [0x413614]
mov ecx, dword [0x413610]
mov edx, dword [0x413620]
push eax
push ecx
push edx
lea eax, [esp + 0x18]
push edi
push eax
call fcn.00405790
mov dword [esp + 0x10], eax
mov eax, dword [esp + 0xc]
test eax, eax
jne 0x40249c
cmp dword [0x413610], 2
jl 0x402411
mov ecx, dword [sym.imp.MSVCRT.dll__iob]
push 0x40ffa4
add ecx, 0x40
push ecx
call dword [sym.imp.MSVCRT.dll_fprintf]
add esp, 8
mov ebx, dword [sym.imp.MSVCRT.dll_fread]
push esi
call fcn.00402820
add esp, 4
test al, al
jne 0x40246b
push esi
push 0x1388
lea edx, [esp + 0x90]
push 1
push edx
call ebx
mov cl, byte [esi + 0xc]
add esp, 0x10
test cl, 0x20
jne 0x402597
test eax, eax
jle 0x402461
mov ecx, dword [esp + 0x10]
push eax
lea eax, [esp + 0x8c]
lea edx, [esp + 0x10]
push eax
push ecx
push edx
call fcn.004058e0
mov eax, dword [esp + 0xc]
test eax, eax
jne 0x40249c
jmp 0x402417
lea eax, [esp + 0x18]
lea ecx, [esp + 0x1c]
push eax
lea edx, [esp + 0x28]
push ecx
mov ecx, dword [esp + 0x18]
lea eax, [esp + 0x28]
push edx
push eax
push 0
lea edx, [esp + 0x20]
push ecx
push edx
call fcn.00405a90
mov eax, dword [esp + 0xc]
test eax, eax
je 0x40252b
lea eax, [esp + 0x18]
lea ecx, [esp + 0x1c]
push eax
lea edx, [esp + 0x28]
push ecx
mov ecx, dword [esp + 0x18]
lea eax, [esp + 0x28]
push edx
push eax
push 1
lea edx, [esp + 0x58]
push ecx
push edx
call fcn.00405a90
mov eax, dword [esp + 0xc]
cmp eax, 0xfffffff7
je 0x402512
cmp eax, 0xfffffffa
je 0x402597
cmp eax, 0xfffffffd
je 0x4024f9
push str.compress:unexpected_error
call fcn.00402850
add esp, 4
push str.compress:end
call fcn.00402850
add esp, 4
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
call fcn.004028d0
push str.compress:end
call fcn.00402850
add esp, 4
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
call fcn.00402900
push str.compress:end
call fcn.00402850
add esp, 4
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
test byte [edi + 0xc], 0x20
jne 0x402597
push edi
call dword [sym.imp.MSVCRT.dll_fflush]
add esp, 4
cmp eax, 0xffffffff
je 0x402597
mov eax, dword [sym.imp.MSVCRT.dll__iob]
mov ebx, dword [sym.imp.MSVCRT.dll_fclose]
add eax, 0x20
cmp edi, eax
je 0x40257b
push edi
call dword [sym.imp.MSVCRT.dll__fileno]
add esp, 4
test eax, eax
jl 0x402597
push eax
call fcn.00402a70
push edi
call ebx
add esp, 8
cmp eax, 0xffffffff
mov dword [0x412590], 0
je 0x402597
mov dword [0x412590], 0
mov al, byte [esi + 0xc]
test al, 0x20
jne 0x402597
push esi
call ebx
add esp, 4
cmp eax, 0xffffffff
jne 0x4025b0
call fcn.00402890
push str.compress:end
call fcn.00402850
add esp, 4
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
cmp dword [0x413610], 1
jl 0x4026ac
mov eax, dword [esp + 0x20]
mov ecx, dword [esp + 0x24]
test eax, eax
jne 0x4025ec
test ecx, ecx
jne 0x4025ec
mov ecx, dword [sym.imp.MSVCRT.dll__iob]
push str._no_data_compressed._n
add ecx, 0x40
push ecx
call dword [sym.imp.MSVCRT.dll_fprintf]
add esp, 8
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
push ecx
lea edx, [esp + 0x40]
push eax
push edx
call fcn.004026c0
mov eax, dword [esp + 0x24]
mov ecx, dword [esp + 0x28]
push eax
lea edx, [esp + 0x44]
push ecx
push edx
call fcn.004026c0
lea eax, [esp + 0x54]
push eax
call fcn.00402710
fstp qword [esp + 0x2c]
lea ecx, [esp + 0x50]
push ecx
call fcn.00402710
fstp qword [esp + 0x48]
lea edx, [esp + 0x5c]
lea eax, [esp + 0x68]
push edx
push eax
call fcn.00402760
lea ecx, [esp + 0x5c]
lea edx, [esp + 0x90]
push ecx
push edx
call fcn.00402760
fld qword [esp + 0x58]
fdiv qword [esp + 0x40]
add esp, 0x30
lea eax, [esp + 0x68]
lea ecx, [esp + 0x48]
mov edx, dword [sym.imp.MSVCRT.dll__iob]
push eax
push ecx
sub esp, 8
add edx, 0x40
sub esp, 8
sub esp, 8
fsubr qword [0x40e0c0]
fmul qword [0x40e0b8]
fstp qword [esp + 0x10]
fld qword [esp + 0x48]
fmul qword [0x40e0b0]
fdiv qword [esp + 0x30]
fstp qword [esp + 8]
fld qword [esp + 0x30]
fdiv qword [esp + 0x48]
fstp qword [esp]
push str._6.3f:1___6.3f_bits_byte___5.2f___saved___s_in___s_out._n
push edx
call dword [sym.imp.MSVCRT.dll_fprintf]
add esp, 0x28
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret