Function at 0x470140
Capabilities:
Get file size
Read file on windows

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x5063e1
mov eax, dword fs:[0]
push eax
sub esp, 0x3d4
mov eax, dword [0x5655c8]
xor eax, ebp
mov dword [ebp - 0x10], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov ebx, dword [ebp + 8]
xor edi, edi
mov dword [ebp - 0x3e0], ebx
xor esi, esi
call fcn.0044e360
push eax
lea ecx, [ebp - 0x94]
call fcn.004493e0
mov dword [ebp - 4], esi
call fcn.0044e380
mov ecx, eax
call fcn.0044a5e0
test al, al
je 0x47026d
push ebx
lea ecx, [ebp - 0x94]
call fcn.00449bd0
push esi
push 0x80
push 3
push esi
push 1
push closesocket
lea ecx, [ebp - 0x94]
call fcn.0044a2d0
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov ebx, eax
cmp ebx, 0xffffffff
jne 0x4701eb
lea ecx, [ebp - 0x94]
mov dword [ebp - 4], eax
call fcn.00449610
jmp 0x470479
push 0
push ebx
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov esi, eax
test esi, esi
jne 0x470211
lea ecx, [ebp - 0x94]
mov dword [ebp - 4], 0xffffffff
call fcn.00449610
jmp 0x470479
push esi
mov dword [ebp - 0x3d0], 0
call fcn.004fe383
add esp, 4
mov edi, eax
lea eax, [ebp - 0x3d0]
push 0
push eax
push esi
push edi
push ebx
call dword [sym.imp.KERNEL32.dll_ReadFile]
push ebx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
cmp dword [ebp - 0x3d0], esi
je 0x470463
push edi
call fcn.004fe38c
add esp, 4
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x94]
xor edi, edi
call fcn.00449610
jmp 0x470479
call fcn.0044e380
push eax
lea ecx, [ebp - 0x94]
call fcn.00449b40
call fcn.0044e790
test al, al
je 0x470293
call fcn.0044e390
mov ebx, eax
jmp 0x47035d
call fcn.0044e3a0
push eax
lea ecx, [ebp - 0x19c]
call fcn.004493e0
lea ecx, [ebp - 0x19c]
mov byte [ebp - 4], 1
call fcn.0044a2d0
mov dword [ebp - 0x3d8], eax
test eax, eax
je 0x47031e
push 0
push 0
push 0
push 0
push 0xffffffffffffffff
push eax
push 0
push 0
call dword [sym.imp.KERNEL32.dll_WideCharToMultiByte]
mov dword [ebp - 0x3d0], eax
inc eax
push eax
mov dword [ebp - 0x3d4], eax
call fcn.004fe383
mov ebx, eax
add esp, 4
test ebx, ebx
je 0x47031e
push dword [ebp - 0x3d4]
push 0
push ebx
call sub.VCRUNTIME140.dll_memset
add esp, 0xc
push 0
push 0
push dword [ebp - 0x3d0]
push ebx
push 0xffffffffffffffff
push dword [ebp - 0x3d8]
push 0
push 0
call dword [sym.imp.KERNEL32.dll_WideCharToMultiByte]
jmp 0x470320
xor ebx, ebx
push ebx
lea ecx, [ebp - 0x94]
call fcn.0044a2d0
push eax
call fcn.00460f60
add esp, 8
mov dword [ebp - 0x3d8], eax
test ebx, ebx
je 0x470348
push ebx
call fcn.004fe38c
add esp, 4
lea ecx, [ebp - 0x19c]
mov byte [ebp - 4], 0
call fcn.00449610
mov ebx, dword [ebp - 0x3d8]
test ebx, ebx
jne 0x470378
lea ecx, [ebp - 0x94]
mov dword [ebp - 4], 0xffffffff
call fcn.00449610
jmp 0x470479
push 0xffffffffffffffff
push dword [ebp - 0x3e0]
lea ecx, [ebp - 0x118]
mov dword [ebp - 0x3dc], 0
call fcn.00449410
push 0x51bf94
push 0x51bf98
lea ecx, [ebp - 0x118]
mov byte [ebp - 4], 2
call fcn.0044a970
lea eax, [ebp - 0x3cc]
push eax
lea eax, [ebp - 0x3dc]
push eax
push 1
lea ecx, [ebp - 0x118]
call fcn.004498e0
push eax
push ebx
call fcn.00460550
add esp, 0x14
test eax, eax
je 0x4703f9
lea ecx, [ebp - 0x118]
call fcn.00449610
lea ecx, [ebp - 0x94]
mov dword [ebp - 4], 0xffffffff
call fcn.00449610
jmp 0x470479
mov esi, dword [ebp - 0x1a0]
test esi, esi
je 0x4703d7
push esi
call fcn.004fe383
push esi
mov edi, eax
push edi
push dword [ebp - 0x3dc]
push ebx
call fcn.004615d0
add esp, 0x14
test eax, eax
je 0x470446
cmp eax, 0x600
je 0x470446
push edi
call fcn.004fe38c
add esp, 4
xor edi, edi
call fcn.0044e790
test al, al
jne 0x4703d7
push ebx
call fcn.00460250
add esp, 4
jmp 0x4703d7
call fcn.0044e790
test al, al
jne 0x470458
push ebx
call fcn.00460250
add esp, 4
lea ecx, [ebp - 0x118]
call fcn.00449610
lea ecx, [ebp - 0x94]
mov dword [ebp - 4], 0xffffffff
call fcn.00449610
test edi, edi
jne 0x4704f2
push 0
push 0x80
push 3
push 0
push 1
push closesocket
push dword [ebp - 0x3e0]
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov ebx, eax
cmp ebx, 0xffffffff
je 0x4704ee
push 0
push ebx
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov esi, eax
test esi, esi
je 0x4704ee
push esi
mov dword [ebp - 0x3d4], 0
call fcn.004fe383
add esp, 4
mov edi, eax
lea eax, [ebp - 0x3d4]
push 0
push eax
push esi
push edi
push ebx
call dword [sym.imp.KERNEL32.dll_ReadFile]
push ebx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
cmp dword [ebp - 0x3d4], esi
je 0x4704ee
push edi
call fcn.004fe38c
add esp, 4
xor edi, edi
test edi, edi
je 0x470508
push esi
push edi
call fcn.004700a0
push edi
mov esi, eax
call fcn.004fe38c
add esp, 0xc
mov eax, esi
jmp 0x47050a
xor eax, eax
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.004fdfc5
mov esp, ebp
pop ebp
ret