Function at 0x405460
Capabilities:
Read file on windows

Disassembly:
sub esp, 0x5c
mov eax, dword [0x4596ac]
xor eax, esp
mov dword [esp + 0x54], eax
mov eax, dword [0x486344]
push ebx
push ebp
push esi
push edi
push eax
push 8
lea ecx, [esp + 0x5c]
push 2
push ecx
call fcn.00435763
add esp, 0x10
cmp eax, 8
jae 0x405493
call fcn.004010f0
push 0x1234
call dword [sym.imp.WS2_32.dll_ntohs]
xor ecx, ecx
mov edx, 0x1234
cmp ax, dx
sete cl
xor eax, eax
mov edx, 0x4949
cmp word [0x465c48], dx
sete al
cmp eax, ecx
jne 0x4054d2
lea ecx, [esp + 0x54]
push 0x10
push ecx
mov edx, ecx
push edx
call fcn.00446b03
add esp, 0xc
movzx eax, word [esp + 0x58]
movzx ecx, word [esp + 0x5c]
cdq
idiv ecx
mov esi, dword [esp + 0x74]
push 4
mov ebp, eax
mov edx, ebp
imul edx, esi
push edx
mov dword [esp + 0x2c], ebp
call fcn.004348ad
mov ebx, eax
add esp, 8
mov dword [esp + 0x30], ebx
test ebx, ebx
je 0x4058c6
movzx eax, word [esp + 0x5a]
mov cx, word [esp + 0x5e]
movzx edi, cx
cdq
idiv edi
mov dword [esp + 0x28], 0
test eax, eax
jbe 0x4058aa
test ebp, ebp
jbe 0x405635
mov edi, ebx
lea eax, [ebx + ebp*4]
mov dword [esp + 0x2c], edi
mov dword [esp + 0x14], eax
mov dword [esp + 0x20], ebp
test esi, esi
jbe 0x40561a
dec esi
shr esi, 1
lea ebx, [ebp*8]
mov ebp, dword [esp + 0x14]
inc esi
cmp dword [esp + 0x70], 0
je 0x40556a
push 8
call fcn.004012e0
add esp, 4
jmp 0x4055d3
mov ecx, dword [0x486344]
push ecx
push 2
lea edx, [esp + 0x20]
push 1
push edx
mov byte [esp + 0x28], 0xff
mov byte [esp + 0x29], 0xff
call fcn.00435763
movzx cx, byte [esp + 0x29]
mov eax, 0x4949
add esp, 0x10
cmp word [0x465c48], ax
jne 0x4055b2
movzx dx, byte [esp + 0x18]
shl cx, 8
or cx, dx
movzx eax, cx
jmp 0x4055c2
movzx ax, byte [esp + 0x18]
shl ax, 8
or ax, cx
movzx eax, ax
movzx edx, ax
mov dword [esp + 0x1c], edx
fild dword [esp + 0x1c]
fmul qword [0x451968]
cmp dword [esp + 0x28], 0
fstp dword [esp + 0x1c]
mov cx, word [esp + 0x5e]
jne 0x4055eb
fld dword [esp + 0x1c]
fstp dword [edi]
jmp 0x405601
fld dword [esp + 0x1c]
movzx eax, cx
fsub dword [edi]
mov dword [esp + 0x1c], eax
fild dword [esp + 0x1c]
fdivp st(1)
fstp dword [ebp]
add edi, ebx
add ebp, ebx
sub esi, 1
jne 0x405557
mov ebp, dword [esp + 0x24]
mov ebx, dword [esp + 0x30]
mov esi, dword [esp + 0x74]
mov edi, dword [esp + 0x2c]
add dword [esp + 0x14], 4
add edi, 4
sub dword [esp + 0x20], 1
mov dword [esp + 0x2c], edi
jne 0x405540
mov edi, dword [esp + 0x28]
test edi, edi
je 0x405891
movzx eax, cx
mov edx, eax
imul edx, edi
movzx edi, word [0x4ac498]
sub edx, edi
movzx edi, word [esp + 0x56]
add edx, edi
mov edi, edx
sub edi, eax
movzx eax, word [0x4ac486]
mov dword [esp + 0x2c], edx
cmp edi, eax
jae 0x405891
cmp edi, edx
jae 0x40588c
mov dword [esp + 0x1c], 1
cmp ebp, 1
jbe 0x405820
lea ecx, [ebx + 4]
mov dword [esp + 0x20], ecx
xor eax, eax
test esi, esi
jbe 0x4056cc
movzx edx, word [esp + 0x5c]
mov dword [esp + 0x14], edx
lea edx, [ebp*8]
fild dword [esp + 0x14]
fld dword [ecx - 4]
add eax, 2
fstp dword [esp + 0x14]
fld dword [esp + 0x14]
fst dword [esp + eax*4 + 0x3c]
fsubr dword [ecx]
add ecx, edx
fdiv st(1)
fstp dword [esp + eax*4 + 0x40]
cmp eax, esi
jb 0x4056aa
fstp st(0)
movzx eax, word [esp + 0x5c]
movzx ecx, word [0x4660a0]
mov esi, eax
imul esi, dword [esp + 0x1c]
sub esi, ecx
movzx ecx, word [esp + 0x54]
add esi, ecx
mov edx, esi
sub edx, eax
movzx eax, word [0x466040]
mov dword [esp + 0x34], esi
cmp edx, eax
jae 0x4057f4
cmp edx, esi
jae 0x4057f4
mov ebx, dword [esp + 0x74]
cmp ebx, 2
jle 0x40572b
mov eax, edi
and eax, 7
mov ecx, edx
and ecx, 1
lea ecx, [ecx + eax*2]
mov eax, dword [0x466120]
add ecx, ecx
shr eax, cl
and eax, 3
jmp 0x40572d
xor eax, eax
test al, 1
jne 0x4057cb
movzx esi, word [0x4ac426]
fld dword [esp + eax*4 + 0x44]
mov ecx, edi
and ecx, 7
mov ebx, edx
and ebx, 1
lea ecx, [ebx + ecx*2]
mov ebx, dword [0x466120]
add ecx, ecx
shr ebx, cl
mov ecx, esi
mov ebp, edi
shr ebp, cl
movzx ecx, word [0x466104]
imul ebp, ecx
mov ecx, edx
mov dword [esp + 0x14], ecx
mov ecx, esi
mov esi, edx
shr esi, cl
and ebx, 3
add ebp, esi
mov esi, dword [0x4ac418]
lea ecx, [ebx + ebp*4]
movzx eax, word [esi + ecx*2]
lea ecx, [esi + ecx*2]
mov dword [esp + 0x14], eax
fild dword [esp + 0x14]
fnstcw word [esp + 0x14]
movzx eax, word [esp + 0x14]
fmulp st(1)
or eax, 0xc00
mov dword [esp + 0x38], eax
fldcw word [esp + 0x38]
fistp qword [esp + 0x38]
mov eax, dword [esp + 0x38]
fldcw word [esp + 0x14]
cmp eax, 0xffff
jb 0x4057c0
mov eax, 0xffff
mov esi, dword [esp + 0x34]
mov ebx, dword [esp + 0x74]
mov word [ecx], ax
xor eax, eax
test ebx, ebx
jbe 0x4057e4
fld dword [esp + eax*4 + 0x48]
add eax, 2
fadd dword [esp + eax*4 + 0x3c]
fstp dword [esp + eax*4 + 0x3c]
cmp eax, ebx
jb 0x4057d1
movzx eax, word [0x466040]
inc edx
cmp edx, eax
jb 0x4056ff
mov eax, dword [esp + 0x1c]
mov ecx, dword [esp + 0x20]
mov ebp, dword [esp + 0x24]
mov esi, dword [esp + 0x74]
inc eax
add ecx, 4
mov dword [esp + 0x1c], eax
mov dword [esp + 0x20], ecx
cmp eax, ebp
jb 0x405690
mov edx, dword [esp + 0x2c]
mov ebx, dword [esp + 0x30]
test ebp, ebp
jbe 0x40587c
mov ecx, dword [esp + 0x24]
lea ebp, [ebx + ebp*4]
mov dword [esp + 0x20], ecx
mov eax, dword [esp + 0x74]
test eax, eax
jbe 0x405863
mov esi, dword [esp + 0x24]
add esi, esi
dec eax
add esi, esi
shr eax, 1
add esi, esi
mov ecx, ebx
mov edx, ebp
inc eax
lea esp, [esp]
fld dword [edx]
add edx, esi
fadd dword [ecx]
fstp dword [ecx]
add ecx, esi
sub eax, 1
jne 0x405850
mov edx, dword [esp + 0x2c]
add ebx, 4
add ebp, 4
sub dword [esp + 0x20], 1
jne 0x40582f
mov ebp, dword [esp + 0x24]
mov ebx, dword [esp + 0x30]
mov esi, dword [esp + 0x74]
movzx eax, word [0x4ac486]
inc edi
cmp edi, eax
jb 0x405670
mov cx, word [esp + 0x5e]
movzx eax, word [esp + 0x5a]
movzx edi, cx
cdq
idiv edi
inc dword [esp + 0x28]
cmp dword [esp + 0x28], eax
jb 0x405527
push ebx
call fcn.0043481f
mov ecx, dword [esp + 0x68]
add esp, 4
pop edi
pop esi
pop ebp
pop ebx
xor ecx, esp
call fcn.004334ab
add esp, 0x5c
ret
mov edx, dword [0x4ac404]
push str.phase_one_flat_field__
push edx
push str._s:_Out_of_memory_in__s_n
call fcn.00434a96
add eax, 0x40
push eax
call fcn.00435780
add esp, 0x10
push 1
push 0x4660c0
call fcn.00435cb8
int3