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

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x425af5
mov eax, dword fs:[0]
push eax
sub esp, 0x30
mov eax, dword [0x432014]
xor eax, ebp
mov dword [ebp - 0x10], eax
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov eax, edx
mov dword [ebp - 0x38], eax
mov dword [ebp - 0x3c], ecx
push 0
push 0x80
push 3
push 0
push 0
push connect
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov edi, eax
cmp edi, 0xffffffff
jne 0x40358f
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
mov edx, str.Could_not_open_file__error
mov ecx, 0x4330d0
call fcn.00406020
mov ecx, eax
call fcn.00403ee0
push eax
call fcn.00405f80
add esp, 4
xor eax, eax
jmp 0x40372c
lea eax, [ebp - 0x30]
push eax
push edi
call dword [sym.imp.KERNEL32.dll_GetFileSizeEx]
test eax, eax
jne 0x4035d2
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
mov edx, str.Could_not_get_file_size__error
mov ecx, 0x4330d0
call fcn.00406020
mov ecx, eax
call fcn.00403ee0
push eax
call fcn.00405f80
add esp, 4
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
xor eax, eax
jmp 0x40372c
xorps xmm0, xmm0
mov dword [ebp - 0x18], 0
movups xmmword [ebp - 0x28], xmm0
mov dword [ebp - 0x14], 0xf
mov byte [ebp - 0x28], 0
mov dword [ebp - 4], 0
mov esi, dword [ebp - 0x30]
test esi, esi
jne 0x403603
mov dword [ebp - 0x18], esi
mov byte [ebp + esi - 0x28], 0
jmp 0x403634
cmp esi, 0xf
ja 0x403621
push esi
lea eax, [ebp - 0x28]
mov dword [ebp - 0x18], esi
push 0
push eax
call fcn.0040b2c0
add esp, 0xc
mov byte [ebp + esi - 0x28], 0
jmp 0x403634
push 0
push esi
mov byte [ebp - 0x34], 0
lea ecx, [ebp - 0x28]
push dword [ebp - 0x34]
push esi
call fcn.00406870
mov edx, str.Reading
mov ecx, 0x432fd8
call fcn.00406020
mov edx, dword [ebp - 0x38]
mov ecx, eax
call fcn.00406020
push eax
call fcn.00405f80
add esp, 4
lea eax, [ebp - 0x28]
cmp dword [ebp - 0x14], 0x10
cmovae eax, dword [ebp - 0x28]
push 0
push 0
push dword [ebp - 0x30]
push eax
push edi
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
jne 0x4036a5
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
mov edx, str.Failed_to_read_file__error
mov ecx, 0x4330d0
call fcn.00406020
mov ecx, eax
call fcn.00403ee0
push eax
call fcn.00405f80
add esp, 4
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
xor esi, esi
jmp 0x4036fa
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
sub esp, 0x18
lea eax, [ebp - 0x28]
mov ecx, esp
mov dword [ebp - 0x38], esp
push eax
call fcn.00404390
sub esp, 0x18
mov byte [ebp - 4], 1
mov ecx, esp
xorps xmm0, xmm0
push 4
movups xmmword [ecx], xmm0
push str._get
mov dword [ecx + 0x10], 0
mov dword [ecx + 0x14], 0
call fcn.00406510
mov ecx, dword [ebp - 0x3c]
mov byte [ebp - 4], 0
call fcn.00402610
add esp, 0x30
mov esi, 1
mov ecx, dword [ebp - 0x14]
cmp ecx, 0x10
jb 0x40372a
mov edx, dword [ebp - 0x28]
inc ecx
mov eax, edx
cmp ecx, 0x1000
jb 0x403720
mov edx, dword [eax - 4]
add ecx, 0x23
sub eax, edx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x403747
push ecx
push edx
call fcn.00409896
add esp, 8
mov eax, esi
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.00409853
mov esp, ebp
pop ebp
ret
call fcn.00410e4d
int3