Function at 0x404ae9
Capabilities:
Read file on windows

Disassembly:
push 0xffffffffffffffff
push 0x411958
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x64
push ebx
push esi
mov esi, ecx
push edi
push 0x418adc
mov dword [esp + 0x10], esi
lea eax, [esi + 0x38]
push eax
call dword [sym.imp.MSVCRT.dll_fopen]
mov ebx, eax
xor edi, edi
add esp, 8
lea ecx, [esp + 0x28]
mov dword [esp + 0x14], ebx
mov dword [esi + 0x238], edi
mov dword [esi + 0x14bb4], edi
mov dword [esi + 0x14be4], edi
mov dword [esi + 0x14bb8], edi
call sym.Player.exe_public:_void___thiscall_CTPImage::constructor_void_
cmp ebx, edi
mov dword [esp + 0x78], edi
je 0x405202
mov eax, dword [esi + 0xc]
mov ecx, dword [esi + 8]
cmp eax, eax
push ebp
mov edx, eax
je 0x404b53
mov ebp, dword [edx]
add edx, 4
mov dword [ecx], ebp
add ecx, 4
cmp edx, eax
jne 0x404b45
mov edx, dword [esi + 0xc]
lea ebp, [esi + 0x14bd4]
mov dword [esi + 0xc], ecx
mov dword [esp + 0x20], edx
mov eax, dword [ebp + 8]
mov ecx, dword [ebp + 4]
cmp eax, eax
mov dword [esp + 0x14], ecx
mov edx, eax
je 0x404b98
mov edi, dword [esp + 0x14]
mov ecx, 0xc
mov esi, edx
add edx, 0x30
rep movsd dword es:[edi], dword [esi]
mov edi, dword [esp + 0x14]
add edi, 0x30
cmp edx, eax
mov dword [esp + 0x14], edi
jne 0x404b73
mov esi, dword [esp + 0x10]
xor edi, edi
mov edx, dword [ebp + 8]
mov eax, dword [esp + 0x14]
push 2
push edi
mov edi, dword [sym.imp.MSVCRT.dll_fseek]
push ebx
mov dword [esp + 0x2c], edx
mov dword [ebp + 8], eax
call edi
push ebx
call dword [sym.imp.MSVCRT.dll_ftell]
mov ecx, dword [esi + 0x23c]
mov dword [esi + 0x238], 0
sub eax, ecx
push 0
mov dword [esi + 0x14bb4], eax
mov ecx, dword [0x4191ec]
push ecx
push ebx
call edi
add esp, 0x1c
jmp 0x404bea
mov ebx, dword [esp + 0x18]
mov esi, dword [esp + 0x10]
push ebx
mov byte [esp + 0x48], 0x53
mov dword [esp + 0x74], 0
call dword [sym.imp.MSVCRT.dll_ftell]
mov edi, dword [sym.imp.MSVCRT.dll_fread]
push ebx
push 1
lea edx, [esp + 0x50]
push 5
push edx
mov dword [esi + 0x238], eax
call edi
add esp, 0x14
test eax, eax
je 0x4051b8
cmp byte [esp + 0x44], 0x53
jne 0x4051b8
mov eax, dword [esp + 0x45]
and eax, 0x3f
jne 0x404c4e
push ebx
push 1
lea eax, [esp + 0x51]
push 4
push eax
call edi
add esp, 0x10
test eax, eax
je 0x4051b8
jmp 0x404c52
mov dword [esp + 0x49], eax
push ebx
call dword [sym.imp.MSVCRT.dll_ftell]
mov ecx, dword [esp + 0x49]
mov dword [esp + 0x54], eax
shr ecx, 6
and ecx, 7
add esp, 4
lea eax, [ecx - 3]
cmp eax, 4
ja case.default.0x404c76
jmp dword [eax*4 + 0x405228]
push ebx
push 1
lea edx, [esp + 0x5c]
push 4
push edx
call edi
add esp, 0x10
mov edi, eax
test edi, edi
je 0x4051b8
push ebx
call dword [sym.imp.MSVCRT.dll_ftell]
mov ecx, dword [esi + 0x14bb4]
add esp, 4
cmp eax, ecx
jge 0x4051b8
mov ecx, dword [esp + 0x45]
and ecx, 0x1c0
cmp ecx, 0x40
jne 0x404f6d
mov eax, dword [ebp + 4]
test eax, eax
jne 0x404de7
mov dword [esp + 0x14], eax
jmp 0x404e01
mov eax, dword [esp + 0x49]
push ebx
push 1
lea ecx, [esi + 0x14bec]
push eax
push ecx
call edi
xor ecx, ecx
add esp, 0x10
mov cl, byte [esi + 0x14cdc]
mov edi, eax
cmp ecx, 0x10
ja case.0x404d00.4
xor edx, edx
mov dl, byte [ecx + 0x405250]
jmp dword [edx*4 + 0x40523c]
xor eax, eax
mov dword [0x4275f8], 1
mov dword [0x4191f0], eax
mov dword [0x4191f4], eax
jmp case.0x404d00.4
mov dword [0x4191f0], 0
mov dword [0x4191f4], 0x1f40
jmp case.0x404d00.4
mov dword [0x4191f0], 0
mov dword [0x4191f4], 0x2b11
jmp case.0x404d00.4
mov dword [0x4191f0], 1
mov dword [0x4191f4], 0x3e80
jmp case.0x404d00.4
push ebx
push 1
lea eax, [esp + 0x60]
push 0x10
push eax
call edi
add esp, 0x10
mov byte [esp + 0x68], 1
jmp 0x404c96
push ebx
push 1
lea ecx, [esp + 0x70]
push 1
push ecx
call edi
push ebx
push 1
lea edx, [esp + 0x70]
push 0x10
push edx
call edi
add esp, 0x20
jmp 0x404c96
mov eax, dword [esi + 0x14bb8]
push 1
inc eax
mov dword [esi + 0x14bb8], eax
mov eax, dword [esp + 0x4d]
push eax
push ebx
call dword [sym.imp.MSVCRT.dll_fseek]
add esp, 0xc
jmp 0x404c96
mov eax, dword [esp + 0x49]
test eax, eax
je 0x404c96
push 1
push eax
push ebx
call dword [sym.imp.MSVCRT.dll_fseek]
add esp, 0xc
jmp 0x404c96
mov ecx, dword [ebp + 8]
sub ecx, eax
mov eax, 0x2aaaaaab
imul ecx
sar edx, 3
mov eax, edx
shr eax, 0x1f
add edx, eax
mov dword [esp + 0x14], edx
mov eax, dword [esi + 0xc]
mov ecx, dword [esi + 0x10]
add esi, 4
sub ecx, eax
sar ecx, 2
cmp ecx, 1
mov edi, eax
jae 0x404ecd
mov ecx, dword [esi + 4]
test ecx, ecx
je 0x404e36
sub eax, ecx
sar eax, 2
cmp eax, 1
jbe 0x404e36
mov ecx, esi
call fcn.00405b00
mov ebx, eax
jmp 0x404e3b
mov ebx, 1
mov ecx, esi
call fcn.00405b00
add eax, ebx
mov dword [esp + 0x20], eax
jns 0x404e4c
xor eax, eax
lea edx, [eax*4]
push edx
call sub.MFC42.DLL_operatornew
add esp, 4
mov ebx, eax
mov eax, dword [esi + 4]
mov ecx, esi
push ebx
push edi
push eax
call fcn.00405b50
lea ecx, [esp + 0x14]
mov dword [esp + 0x1c], eax
push ecx
push 1
push eax
mov ecx, esi
call fcn.00405b80
mov edx, dword [esp + 0x1c]
mov eax, dword [esi + 8]
add edx, 4
mov ecx, esi
push edx
push eax
push edi
call fcn.00405b50
mov ecx, dword [esi + 8]
mov edx, dword [esi + 4]
push ecx
push edx
mov ecx, esi
call fcn.004091d0
mov eax, dword [esi + 4]
push eax
call sub.MFC42.DLL_operatordelete
mov ecx, dword [esp + 0x24]
add esp, 4
lea edx, [ebx + ecx*4]
mov ecx, esi
mov dword [esi + 0xc], edx
call fcn.00405b00
lea eax, [ebx + eax*4 + 4]
mov dword [esi + 4], ebx
mov dword [esi + 8], eax
jmp 0x404f6d
mov ecx, eax
sub ecx, edi
sar ecx, 2
cmp ecx, 1
jae 0x404f22
lea ecx, [edi + 4]
push ecx
push eax
push edi
mov ecx, esi
call fcn.00405b50
mov eax, dword [esi + 8]
lea edx, [esp + 0x14]
mov ecx, eax
push edx
sub ecx, edi
mov edx, 1
sar ecx, 2
sub edx, ecx
mov ecx, esi
push edx
push eax
call fcn.00405b80
mov esi, dword [esi + 8]
cmp edi, esi
je 0x404f19
mov eax, dword [esp + 0x14]
mov dword [edi], eax
add edi, 4
cmp edi, esi
jne 0x404f0c
mov ecx, dword [esp + 0x10]
lea eax, [ecx + 4]
jmp 0x404f69
lea ecx, [eax - 4]
push eax
push eax
mov dword [esp + 0x28], ecx
push ecx
mov ecx, esi
call fcn.00405b50
mov esi, dword [esi + 8]
lea eax, [esi - 4]
cmp edi, eax
je 0x404f4c
mov edx, dword [eax - 4]
sub eax, 4
sub esi, 4
cmp eax, edi
mov dword [esi], edx
jne 0x404f3d
lea ecx, [edi + 4]
mov eax, edi
cmp edi, ecx
je 0x404f62
mov edx, dword [esp + 0x14]
mov dword [eax], edx
add eax, 4
cmp eax, ecx
jne 0x404f55
mov eax, dword [esp + 0x10]
add eax, 4
add dword [eax + 8], 4
mov ecx, dword [ebp + 8]
mov edx, dword [ebp + 0xc]
sub edx, ecx
mov eax, 0x2aaaaaab
imul edx
sar edx, 3
mov eax, edx
mov ebx, ecx
shr eax, 0x1f
add edx, eax
cmp edx, 1
jae 0x40504e
mov eax, dword [ebp + 4]
test eax, eax
je 0x404fb2
sub ecx, eax
mov eax, 0x2aaaaaab
imul ecx
sar edx, 3
mov ecx, edx
shr ecx, 0x1f
add edx, ecx
cmp edx, 1
mov esi, edx
ja 0x404fb7
mov esi, 1
mov ecx, ebp
call fcn.00405b20
mov edi, eax
add edi, esi
mov eax, edi
jns 0x404fc8
xor eax, eax
lea edx, [eax + eax*2]
shl edx, 4
push edx
call sub.MFC42.DLL_operatornew
add esp, 4
mov esi, eax
mov eax, dword [ebp + 4]
mov ecx, ebp
push esi
push ebx
push eax
call fcn.00405bb0
lea ecx, [esp + 0x44]
mov dword [esp + 0x20], eax
push ecx
push 1
push eax
mov ecx, ebp
call fcn.00405bf0
mov edx, dword [esp + 0x20]
mov eax, dword [ebp + 8]
add edx, 0x30
mov ecx, ebp
push edx
push eax
push ebx
call fcn.00405bb0
mov ecx, dword [ebp + 8]
mov edx, dword [ebp + 4]
push ecx
push edx
mov ecx, ebp
call fcn.004091d0
mov eax, dword [ebp + 4]
push eax
call sub.MFC42.DLL_operatordelete
lea ecx, [edi + edi*2]
add esp, 4
shl ecx, 4
add ecx, esi
mov dword [ebp + 0xc], ecx
mov ecx, ebp
call fcn.00405b20
inc eax
mov dword [ebp + 4], esi
lea edx, [eax + eax*2]
shl edx, 4
add edx, esi
mov dword [ebp + 8], edx
jmp 0x40510e
mov edx, ecx
mov eax, 0x2aaaaaab
sub edx, ebx
imul edx
sar edx, 3
mov eax, edx
shr eax, 0x1f
add edx, eax
cmp edx, 1
jae 0x4050bf
lea edx, [ebx + 0x30]
push edx
push ecx
push ebx
mov ecx, ebp
call fcn.00405bb0
mov esi, dword [ebp + 8]
lea eax, [esp + 0x44]
mov ecx, esi
push eax
sub ecx, ebx
mov eax, 0x2aaaaaab
imul ecx
sar edx, 3
mov ecx, edx
mov eax, 1
shr ecx, 0x1f
add edx, ecx
mov ecx, ebp
sub eax, edx
push eax
push esi
call fcn.00405bf0
mov eax, dword [ebp + 8]
cmp ebx, eax
je 0x40510a
mov edi, ebx
add ebx, 0x30
mov ecx, 0xc
lea esi, [esp + 0x44]
cmp ebx, eax
rep movsd dword es:[edi], dword [esi]
jne 0x4050a9
jmp 0x40510a
lea eax, [ecx - 0x30]
push ecx
push ecx
push eax
mov ecx, ebp
mov dword [esp + 0x2c], eax
call fcn.00405bb0
mov edx, dword [ebp + 8]
lea eax, [edx - 0x30]
cmp ebx, eax
je 0x4050ef
sub eax, 0x30
sub edx, 0x30
mov ecx, 0xc
mov esi, eax
mov edi, edx
cmp eax, ebx
rep movsd dword es:[edi], dword [esi]
jne 0x4050da
lea eax, [ebx + 0x30]
cmp ebx, eax
je 0x40510a
mov edi, ebx
add ebx, 0x30
mov ecx, 0xc
lea esi, [esp + 0x44]
cmp ebx, eax
rep movsd dword es:[edi], dword [esi]
jne 0x4050f6
add dword [ebp + 8], 0x30
mov ecx, dword [esp + 0x10]
mov edi, dword [ecx + 0x34]
test edi, edi
je 0x404be2
mov eax, dword [esp + 0x45]
and eax, 0x1c0
cmp eax, 0x40
je 0x405136
cmp eax, 0x80
jne 0x404be2
mov esi, dword [esp + 0x10]
mov dword [esp + 0x28], 0
mov eax, dword [esi + 0x14bb0]
mov edx, dword [esi + 0x240]
inc eax
push edx
mov edx, dword [esi + 0x23c]
mov dword [esi + 0x14bb0], eax
mov eax, dword [esp + 0x54]
sub eax, edx
mov dword [esp + 0x28], eax
fild qword [esp + 0x28]
fidiv dword [esi + 0x14bb4]
fmul qword [0x4128e8]
call sub.MSVCRT.dll__ftol
push eax
push 1
call edi
mov eax, dword [esp + 0x55]
mov ecx, dword [esi + 0x14be4]
add esp, 0xc
cmp ecx, eax
jae 0x404be2
mov ecx, dword [esp + 0x45]
and ecx, 0x1c0
cmp ecx, 0x80
jne 0x404be2
mov edx, esi
mov dword [edx + 0x14be4], eax
jmp 0x404be2
push ebx
call dword [sym.imp.MSVCRT.dll_ftell]
push ebx
mov dword [esi + 0x238], eax
call dword [sym.imp.MSVCRT.dll_fclose]
mov eax, dword [esi + 0x238]
add esp, 8
test eax, eax
pop ebp
jle 0x405202
lea ecx, [esp + 0x28]
mov dword [esp + 0x78], 0xffffffff
call sym.Player.exe_public_virtual:_void___thiscall_CTPImage::destructor_void_
pop edi
pop esi
mov eax, 1
pop ebx
mov ecx, dword [esp + 0x64]
mov dword fs:[0], ecx
add esp, 0x70
ret
lea ecx, [esp + 0x28]
mov dword [esp + 0x78], 0xffffffff
call sym.Player.exe_public_virtual:_void___thiscall_CTPImage::destructor_void_
mov ecx, dword [esp + 0x70]
pop edi
pop esi
xor eax, eax
pop ebx
mov dword fs:[0], ecx
add esp, 0x70
ret