Function at 0x404640
Capabilities:
Read file on windows

Disassembly:
push 0xffffffffffffffff
push 0x410e48
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 0x41809c
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 + 0x14be0], edi
call sym.Player.exe_public:_void___thiscall_CTPImage::constructor_void_
cmp ebx, edi
mov dword [esp + 0x78], edi
je 0x404cb7
mov eax, dword [esi + 0xc]
mov ecx, dword [esi + 8]
cmp eax, eax
push ebp
mov edx, eax
je 0x4046bd
mov ebp, dword [edx]
add edx, 4
mov dword [ecx], ebp
add ecx, 4
cmp edx, eax
jne 0x4046af
mov edx, dword [esi + 0xc]
lea ebp, [esi + 0x14bd0]
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 0x404702
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 0x4046dd
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 [0x4187ac]
push ecx
push ebx
call edi
add esp, 0x1c
jmp 0x404754
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 0x404c6d
cmp byte [esp + 0x44], 0x53
jne 0x404c6d
mov eax, dword [esp + 0x45]
and eax, 0x3f
jne 0x4047b8
push ebx
push 1
lea eax, [esp + 0x51]
push 4
push eax
call edi
add esp, 0x10
test eax, eax
je 0x404c6d
jmp 0x4047bc
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 - 4]
cmp eax, 3
ja case.default.0x4047e0
jmp dword [eax*4 + 0x404cdc]
push ebx
push 1
lea edx, [esp + 0x5c]
push 4
push edx
call edi
add esp, 0x10
test eax, eax
je 0x404c6d
push ebx
call dword [sym.imp.MSVCRT.dll_ftell]
mov ecx, dword [esi + 0x14bb4]
add esp, 4
cmp eax, ecx
jge 0x404c6d
mov ecx, dword [esp + 0x45]
and ecx, 0x1c0
cmp ecx, 0x40
jne 0x404a2e
mov eax, dword [ebp + 4]
test eax, eax
jne 0x4048af
mov dword [esp + 0x14], eax
jmp 0x4048c9
mov eax, dword [esp + 0x49]
push ebx
push 1
lea ecx, [esi + 0x14be8]
push eax
push ecx
call edi
mov cl, byte [esi + 0x14cd8]
add esp, 0x10
xor edx, edx
cmp cl, 2
sete dl
mov dword [0x4187b0], edx
jmp 0x4047f6
push ebx
push 1
lea eax, [esp + 0x60]
push 0x10
push eax
call edi
add esp, 0x10
mov byte [esp + 0x68], 1
jmp 0x4047fe
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 0x4047fe
mov eax, dword [esp + 0x49]
push 1
push eax
push ebx
call dword [sym.imp.MSVCRT.dll_fseek]
add esp, 0xc
jmp 0x4047fe
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 edi, dword [esi + 0xc]
mov ecx, dword [esi + 0x10]
add esi, 4
sub ecx, edi
sar ecx, 2
cmp ecx, 1
jae 0x40498e
mov ecx, esi
call fcn.004054d0
cmp eax, 1
jbe 0x4048f7
mov ecx, esi
call fcn.004054d0
mov ebx, eax
jmp 0x4048fc
mov ebx, 1
mov ecx, esi
call fcn.004054d0
add eax, ebx
mov dword [esp + 0x20], eax
jns 0x40490d
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.00405560
lea ecx, [esp + 0x14]
mov dword [esp + 0x1c], eax
push ecx
push 1
push eax
mov ecx, esi
call fcn.00405590
mov edx, dword [esp + 0x1c]
mov eax, dword [esi + 8]
add edx, 4
mov ecx, esi
push edx
push eax
push edi
call fcn.00405560
mov ecx, dword [esi + 8]
mov edx, dword [esi + 4]
push ecx
push edx
mov ecx, esi
call fcn.00405550
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.004054d0
lea eax, [ebx + eax*4 + 4]
mov dword [esi + 4], ebx
mov dword [esi + 8], eax
jmp 0x404a2e
mov eax, edi
sub eax, edi
sar eax, 2
cmp eax, 1
jae 0x4049e3
lea ecx, [edi + 4]
push ecx
push edi
push edi
mov ecx, esi
call fcn.00405560
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.00405590
mov esi, dword [esi + 8]
cmp edi, esi
je 0x4049da
mov eax, dword [esp + 0x14]
mov dword [edi], eax
add edi, 4
cmp edi, esi
jne 0x4049cd
mov ecx, dword [esp + 0x10]
lea eax, [ecx + 4]
jmp 0x404a2a
lea eax, [edi - 4]
push edi
push edi
push eax
mov ecx, esi
mov dword [esp + 0x2c], eax
call fcn.00405560
mov esi, dword [esi + 8]
lea eax, [esi - 4]
cmp edi, eax
je 0x404a0d
mov edx, dword [eax - 4]
sub eax, 4
sub esi, 4
cmp eax, edi
mov dword [esi], edx
jne 0x4049fe
lea ecx, [edi + 4]
mov eax, edi
cmp edi, ecx
je 0x404a23
mov edx, dword [esp + 0x14]
mov dword [eax], edx
add eax, 4
cmp eax, ecx
jne 0x404a16
mov eax, dword [esp + 0x10]
add eax, 4
add dword [eax + 8], 4
mov ebx, dword [ebp + 8]
mov ecx, dword [ebp + 0xc]
sub ecx, ebx
mov eax, 0x2aaaaaab
imul ecx
sar edx, 3
mov ecx, edx
shr ecx, 0x1f
add edx, ecx
cmp edx, 1
jae 0x404b03
mov ecx, ebp
call fcn.00405520
cmp eax, 1
jbe 0x404a67
mov ecx, ebp
call fcn.00405520
mov esi, eax
jmp 0x404a6c
mov esi, 1
mov ecx, ebp
call fcn.00405520
mov edi, eax
add edi, esi
mov eax, edi
jns 0x404a7d
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.004055c0
lea ecx, [esp + 0x44]
mov dword [esp + 0x20], eax
push ecx
push 1
push eax
mov ecx, ebp
call fcn.00405600
mov edx, dword [esp + 0x20]
mov eax, dword [ebp + 8]
add edx, 0x30
mov ecx, ebp
push edx
push eax
push ebx
call fcn.004055c0
mov ecx, dword [ebp + 8]
mov edx, dword [ebp + 4]
push ecx
push edx
mov ecx, ebp
call fcn.00405550
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.00405520
inc eax
mov dword [ebp + 4], esi
lea edx, [eax + eax*2]
shl edx, 4
add edx, esi
mov dword [ebp + 8], edx
jmp 0x404bc3
mov ecx, ebx
mov eax, 0x2aaaaaab
sub ecx, ebx
imul ecx
sar edx, 3
mov eax, edx
shr eax, 0x1f
add edx, eax
cmp edx, 1
jae 0x404b74
lea ecx, [ebx + 0x30]
push ecx
push ebx
push ebx
mov ecx, ebp
call fcn.004055c0
mov esi, dword [ebp + 8]
lea edx, [esp + 0x44]
mov ecx, esi
mov eax, 0x2aaaaaab
sub ecx, ebx
push edx
imul ecx
sar edx, 3
mov eax, edx
mov ecx, 1
shr eax, 0x1f
add edx, eax
sub ecx, edx
push ecx
push esi
mov ecx, ebp
call fcn.00405600
mov eax, dword [ebp + 8]
cmp ebx, eax
je 0x404bbf
mov edi, ebx
add ebx, 0x30
mov ecx, 0xc
lea esi, [esp + 0x44]
cmp ebx, eax
rep movsd dword es:[edi], dword [esi]
jne 0x404b5e
jmp 0x404bbf
lea eax, [ebx - 0x30]
push ebx
push ebx
push eax
mov ecx, ebp
mov dword [esp + 0x2c], eax
call fcn.004055c0
mov edx, dword [ebp + 8]
lea eax, [edx - 0x30]
cmp ebx, eax
je 0x404ba4
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 0x404b8f
lea eax, [ebx + 0x30]
cmp ebx, eax
je 0x404bbf
mov edi, ebx
add ebx, 0x30
mov ecx, 0xc
lea esi, [esp + 0x44]
cmp ebx, eax
rep movsd dword es:[edi], dword [esi]
jne 0x404bab
add dword [ebp + 8], 0x30
mov edx, dword [esp + 0x10]
mov edi, dword [edx + 0x34]
test edi, edi
je 0x40474c
mov eax, dword [esp + 0x45]
and eax, 0x1c0
cmp eax, 0x40
je 0x404beb
cmp eax, 0x80
jne 0x40474c
mov esi, dword [esp + 0x10]
mov ecx, dword [esp + 0x50]
mov dword [esp + 0x28], 0
mov edx, dword [esi + 0x23c]
mov eax, dword [esi + 0x14bb0]
sub ecx, edx
inc eax
mov dword [esp + 0x24], ecx
mov dword [esi + 0x14bb0], eax
fild qword [esp + 0x24]
mov eax, dword [esi + 0x240]
push eax
fidiv dword [esi + 0x14bb4]
fmul qword [0x412738]
call sub.MSVCRT.dll__ftol
push eax
push 1
call edi
mov eax, dword [esp + 0x55]
mov ecx, dword [esi + 0x14be0]
add esp, 0xc
cmp ecx, eax
jae 0x40474c
mov edx, dword [esp + 0x45]
and edx, 0x1c0
cmp edx, 0x80
jne 0x40474c
mov ecx, esi
mov dword [ecx + 0x14be0], eax
jmp 0x40474c
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 0x404cb7
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