Function at 0x4170f0
Capabilities:
Read file on windows

Disassembly:
push 0xffffffffffffffff
push 0x52f66c
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x440
mov eax, dword [esp + 0x450]
push ebx
mov ebx, dword [sym.imp.MSVCRT.dll_fseek]
push ebp
push esi
mov esi, ecx
mov ecx, dword [0x659a18]
push edi
push 0
push eax
push ecx
call ebx
mov edx, dword [0x659a18]
mov edi, dword [sym.imp.MSVCRT.dll_fread]
push edx
lea eax, [esi + 0x14]
push 1
push 0x10
push eax
call edi
mov eax, dword [0x659a18]
push eax
call dword [sym.imp.MSVCRT.dll_ftell]
mov ecx, dword [0x659a18]
push 1
push 0x10
push ecx
mov dword [esp + 0x50], eax
call ebx
mov edx, dword [0x659a18]
lea eax, [esi + 0x24]
push edx
push 1
push 4
push eax
call edi
mov ecx, dword [0x659a18]
lea eax, [esi + 0x28]
push ecx
push 1
push 2
push eax
call edi
mov edx, dword [0x659a18]
add esp, 0x4c
lea eax, [esi + 0x2a]
push edx
push 1
push 2
push eax
call edi
mov eax, dword [0x659a18]
lea ebp, [esi + 0x2c]
push eax
push 1
push 2
push ebp
call edi
mov ecx, dword [0x659a18]
lea eax, [esi + 0x2e]
push ecx
push 1
push 2
push eax
call edi
mov edx, dword [0x659a18]
lea eax, [esi + 0x30]
push edx
push 1
push 4
push eax
call edi
mov ecx, dword [0x659958]
add esp, 0x40
xor eax, eax
cmp ecx, 0x10
mov dword [esp + 0x14], eax
jl 0x4171f0
mov eax, dword [0x659a18]
lea ecx, [esp + 0x14]
push eax
push 1
push 4
push ecx
call edi
add esp, 0x10
xor eax, eax
mov ecx, dword [0x659958]
mov dword [esp + 0x20], eax
cmp ecx, 0x18
mov dword [esp + 0x1c], eax
mov dword [esp + 0x18], eax
jl 0x4173ca
cmp dword [esp + 0x468], eax
jne 0x4173ca
test byte [ebp + 1], 0xc0
je 0x417254
push 0x24
call fcn.00470250
mov ebx, eax
add esp, 4
test ebx, ebx
je 0x41724d
mov edx, dword [0x659a18]
push 1
push edx
call dword [sym.imp.MSVCRT.dll_ftell]
add esp, 4
mov ecx, ebx
push eax
call fcn.00488fd0
mov dword [esi + 0xc], eax
jmp 0x417263
xor eax, eax
mov dword [esi + 0xc], eax
jmp 0x417263
mov eax, dword [0x659a18]
push 1
push 0x10
push eax
call ebx
add esp, 0xc
mov ecx, dword [0x659a18]
lea ebx, [esi + 0x50]
push ecx
push 1
push 4
push ebx
call edi
mov edx, dword [0x659a18]
mov eax, dword [ebx]
push edx
push eax
lea ecx, [esp + 0x68]
push 4
push ecx
call edi
mov ebp, dword [ebx]
lea eax, [ebp*8]
sub eax, ebp
lea edx, [eax + eax*2]
lea eax, [edx*4 + 4]
push eax
call fcn.00470280
add esp, 0x24
test eax, eax
je 0x4172cb
push 0x417750
mov dword [eax], ebp
push 0x417720
add eax, 4
push ebp
push 0x54
push eax
mov dword [esp + 0x24], eax
call fcn.0051c73f
mov eax, dword [esp + 0x10]
jmp 0x4172cd
xor eax, eax
mov dword [esi + 0x54], eax
mov ecx, dword [0x659a18]
push ecx
push 1
lea edx, [esp + 0x28]
push 4
push edx
call edi
mov eax, dword [0x659958]
add esp, 0x10
cmp eax, 0x1a
jl 0x417386
mov eax, dword [0x659a18]
lea ebp, [esi + 0x5c]
push eax
push 1
push 4
push ebp
call edi
mov al, byte [ebp]
add esp, 0x10
test al, 1
je 0x417343
push 0x24
call fcn.00470250
mov ebp, eax
add esp, 4
test ebp, ebp
je 0x41733c
mov ecx, dword [0x659a18]
push 1
push ecx
call dword [sym.imp.MSVCRT.dll_ftell]
add esp, 4
mov ecx, ebp
push eax
call fcn.00488fd0
mov dword [esi + 0x60], eax
jmp 0x417357
xor eax, eax
mov dword [esi + 0x60], eax
jmp 0x417357
mov edx, dword [0x659a18]
push 1
push 0x10
push edx
call dword [sym.imp.MSVCRT.dll_fseek]
add esp, 0xc
cmp dword [0x659958], 0x1c
jl 0x417386
mov eax, dword [0x659a18]
lea ecx, [esp + 0x1c]
push eax
push 1
push 4
push ecx
call edi
mov edx, dword [0x659a18]
lea eax, [esp + 0x28]
push edx
push 1
push 4
push eax
call edi
add esp, 0x20
mov eax, dword [ebx]
mov dword [esp + 0x10], 0
test eax, eax
jbe 0x41743a
xor ebp, ebp
lea edi, [esp + 0x50]
mov ecx, dword [edi]
lea eax, [esi + 0x14]
push eax
mov eax, dword [esi + 0x54]
push 1
push ecx
mov ecx, ebp
add ecx, eax
call fcn.00427fe0
mov eax, dword [esp + 0x10]
mov ecx, dword [ebx]
inc eax
add edi, 4
add ebp, 0x54
cmp eax, ecx
mov dword [esp + 0x10], eax
jb 0x41739e
jmp 0x41743a
movsx edi, word [esi + 0x20]
lea ebx, [esi + 0x50]
lea eax, [edi*8]
sub eax, edi
mov dword [ebx], edi
lea edx, [eax + eax*2]
lea eax, [edx*4 + 4]
push eax
call fcn.00470280
add esp, 4
test eax, eax
je 0x41740d
push 0x417750
push 0x417720
lea ebp, [eax + 4]
push edi
push 0x54
push ebp
mov dword [eax], edi
call fcn.0051c73f
jmp 0x41740f
xor ebp, ebp
mov ecx, dword [ebx]
xor eax, eax
test ecx, ecx
mov dword [esi + 0x54], ebp
jbe 0x41743a
xor edi, edi
mov cl, byte [esi + 0x18]
mov edx, dword [esi + 0x54]
sub cl, 2
neg cl
sbb cl, cl
add edi, 0x54
and ecx, 2
inc eax
mov byte [edi + edx - 0x53], cl
mov ecx, dword [ebx]
cmp eax, ecx
jb 0x41741c
mov eax, dword [esp + 0x20]
mov edi, dword [esp + 0x464]
test eax, eax
je 0x41747a
test edi, edi
jne 0x41747a
push 0x2a4
call fcn.00470250
add esp, 4
test eax, eax
je 0x41746e
mov ecx, dword [esp + 0x20]
push edi
push esi
push ecx
mov ecx, eax
call fcn.0043fc10
jmp 0x417470
xor eax, eax
mov dword [esi + 0x58], eax
mov edx, dword [eax]
mov ecx, eax
call dword [edx + 0xc]
mov eax, dword [esp + 0x1c]
or ebp, 0xffffffff
test eax, eax
je 0x4174c2
push 0x150
call sub.MFC42u.DLL_operatornew
add esp, 4
mov dword [esp + 0x10], eax
test eax, eax
mov dword [esp + 0x458], 0
je 0x4174b6
mov ecx, dword [esp + 0x1c]
push 0
push esi
push ecx
mov ecx, eax
call fcn.00415430
jmp 0x4174b8
xor eax, eax
mov dword [esp + 0x458], ebp
mov dword [esi + 0x64], eax
mov eax, dword [esp + 0x18]
test eax, eax
je 0x417504
push 0x46c
call sub.MFC42u.DLL_operatornew
add esp, 4
mov dword [esp + 0x10], eax
test eax, eax
mov dword [esp + 0x458], 1
je 0x4174f8
mov edx, dword [esp + 0x18]
mov ecx, eax
push edx
call fcn.00416650
jmp 0x4174fa
xor eax, eax
mov dword [esp + 0x458], ebp
mov dword [esi + 0x68], eax
mov al, byte [esi + 0x2c]
shr al, 2
test al, 1
je 0x41751a
mov ecx, dword [esp + 0x24]
push ecx
mov ecx, esi
call fcn.0040ec90
cmp word [esi + 0x2e], 0
jne 0x417527
mov word [esi + 0x2e], 1
test edi, edi
mov ebp, 1
je 0x417544
test byte [esi + 0x2c], 1
jne 0x417544
xor edi, edi
xor ebp, ebp
mov di, word [esi + 0x28]
mov bp, word [esi + 0x2a]
jmp 0x417553
xor edi, edi
xor edx, edx
mov di, word [esi + 0x2a]
mov dx, word [esi + 0x28]
imul edi, edx
mov ax, word [esi + 0x2c]
shr eax, 0xd
test al, 1
jne 0x417569
mov eax, dword [esi + 0x24]
lea ecx, [eax + eax*4]
shl ecx, 1
mov dword [esi + 0x24], ecx
cmp dword [esi + 0x24], 1
jae 0x417576
mov dword [esi + 0x24], 1
mov edx, dword [esi + 0x24]
mov ecx, esi
mov dword [esi + 0x34], edx
call fcn.00418270
mov ax, word [esi + 0x2c]
mov ecx, eax
shr ecx, 0xc
test cl, 1
je 0x417596
test ah, 7
jne 0x41759e
mov dword [esp + 0x14], 0
mov edx, dword [str..trd]
mov ecx, dword [esp + 0x460]
shr eax, 8
mov dword [esp + 0x28], edx
mov edx, dword [0x659960]
mov dword [esp + 0x2c], ecx
and eax, 7
lea ecx, [esi + 0x14]
mov dword [esp + 0x30], edx
mov dword [esp + 0x34], eax
mov dword [esp + 0x38], edi
mov dword [esp + 0x3c], 0
call fcn.004b53f0
mov cl, byte [esi + 0x2c]
mov dword [esp + 0x40], eax
mov eax, dword [ebx]
xor edi, edi
shr cl, 6
test cl, 1
mov dword [esp + 0x44], edi
mov dword [esp + 0x48], eax
mov word [esp + 0x4c], bp
mov word [esp + 0x4e], di
je 0x41763e
push 0x48
call fcn.00470250
add esp, 4
cmp eax, edi
je 0x417635
mov edx, dword [esi + 0x54]
mov ecx, dword [esp + 0x14]
push edx
mov edx, dword [esi + 0x30]
push ecx
lea ecx, [edx + edx + 0x400]
lea edx, [esp + 0x40]
push ecx
lea ecx, [esp + 0x34]
push edx
push ecx
mov ecx, eax
call fcn.00491300
jmp 0x417637
xor eax, eax
mov dword [esi + 0x44], eax
mov dword [esp + 0x14], edi
mov ax, word [esi + 0x2c]
mov edx, eax
shr edx, 0xb
test dl, 1
je 0x417680
test ah, 7
je 0x417680
push 0x50
call fcn.00470250
add esp, 4
cmp eax, edi
je 0x41767b
mov ecx, dword [esi + 0x54]
mov edx, dword [esp + 0x14]
push ecx
push edx
lea ecx, [esp + 0x40]
lea edx, [esp + 0x30]
push ecx
push edx
mov ecx, eax
call fcn.004917f0
jmp 0x41767d
xor eax, eax
mov dword [esi + 0x48], eax
mov eax, dword [esi + 0x44]
lea edi, [esi + 0x44]
test eax, eax
jne 0x4176bf
mov eax, dword [esi + 0x48]
test eax, eax
jne 0x4176bf
push 0x48
call fcn.00470250
add esp, 4
test eax, eax
je 0x4176bb
mov ecx, dword [esi + 0x54]
mov edx, dword [esp + 0x14]
push ecx
push edx
lea ecx, [esp + 0x40]
lea edx, [esp + 0x30]
push ecx
push edx
mov ecx, eax
call fcn.00491550
jmp 0x4176bd
xor eax, eax
mov dword [edi], eax
mov ebx, edi
mov ebp, 2
mov ecx, dword [ebx]
test ecx, ecx
je 0x4176d1
mov eax, dword [ecx]
call dword [eax + 4]
add ebx, 4
dec ebp
jne 0x4176c6
mov ecx, dword [0x659a44]
mov eax, dword [esi + 0x5c]
test ecx, eax
je 0x4176fa
mov ebx, 2
mov ecx, dword [edi]
test ecx, ecx
je 0x4176f4
call fcn.00491040
add edi, 4
dec ebx
jne 0x4176e9
mov ecx, dword [esp + 0x450]
xor edx, edx
mov dl, byte [esi + 0x16]
pop edi
mov dword [esi + 0x74], edx
pop esi
pop ebp
pop ebx
mov dword fs:[0], ecx
add esp, 0x44c
ret 0xc