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

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
push 0xffffffffffffffff
push 0x4826bb
mov eax, dword fs:[0]
push eax
sub esp, 0xc8
mov eax, dword [0x4a0ee0]
xor eax, esp
mov dword [esp + 0xc0], eax
push ebx
push esi
push edi
mov eax, dword [0x4a0ee0]
xor eax, esp
push eax
lea eax, [esp + 0xd8]
mov dword fs:[0], eax
mov eax, dword [ebp + 8]
mov edi, ecx
xor ebx, ebx
lea esi, [esp + 0x50]
mov dword [esp + 0x20], edi
mov dword [esp + 0x14], eax
mov dword [esp + 0x18], ebx
call fcn.00424973
mov dword [esp + 0xe0], ebx
cmp dword [edi + 0x18], ebx
je 0x4185be
mov eax, edi
call fcn.00424f31
push dword [ebp + 0xc]
call fcn.004256ed
mov eax, esi
push eax
push dword [esp + 0x18]
call fcn.00424e57
jmp 0x418805
lea edi, [esp + 0x90]
call fcn.004183d6
mov byte [esp + 0xe0], 1
cmp dword [esp + 0xac], 8
mov eax, dword [esp + 0x98]
jae 0x4185ea
lea eax, [esp + 0x98]
push ebx
push 0x80
push 3
push ebx
push 1
push closesocket
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov esi, eax
mov dword [esp + 0x1c], esi
cmp esi, 0xffffffff
je 0x4187ec
lea eax, [esp + 0x2c]
push eax
push esi
call dword [sym.imp.KERNEL32.dll_GetFileSizeEx]
test eax, eax
jne 0x41862c
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
jmp 0x4187ec
mov eax, dword [esp + 0x30]
cmp eax, ebx
mov ecx, dword [esp + 0x2c]
mov dword [esp + 0x24], ecx
mov dword [esp + 0x28], eax
jg 0x418620
jl 0x418620
cmp ecx, ebx
jbe 0x418620
cmp eax, ebx
jl 0x418654
jg 0x418620
cmp ecx, 0x7f8
jae 0x418620
mov esi, 0x800
push esi
call fcn.0044e8ec
pop ecx
push esi
mov edi, eax
push ebx
push edi
call fcn.00467850
add esp, 0xc
push ebx
lea eax, [esp + 0x1c]
push eax
push dword [esp + 0x2c]
mov dword [esp + 0x24], ebx
push edi
push dword [esp + 0x2c]
call dword [sym.imp.KERNEL32.dll_ReadFile]
push dword [esp + 0x1c]
mov esi, eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
cmp esi, ebx
je 0x4187e5
cmp dword [esp + 0x18], ebx
jbe 0x4187e5
lea eax, [edi + 2]
push eax
lea eax, [esp + 0xb4]
push eax
call fcn.00424e0d
push edi
mov byte [esp + 0xe4], 2
call fcn.004602fe
pop ecx
lea eax, [esp + 0x38]
push eax
call fcn.00438f90
push 0x48c65c
lea eax, [esp + 0x74]
push eax
mov byte [esp + 0xe8], 3
call fcn.00424e0d
lea eax, [esp + 0x38]
push eax
lea edx, [esp + 0x74]
lea ecx, [esp + 0xb4]
mov byte [esp + 0xe4], 4
call fcn.00426dea
lea ecx, [esp + 0x70]
mov byte [esp + 0xe0], 3
call fcn.0042523a
mov eax, dword [esp + 0x48]
sub eax, dword [esp + 0x44]
sar eax, 5
cmp eax, 2
jb 0x4187bd
push ebx
lea esi, [esp + 0x3c]
call fcn.00408907
push eax
lea eax, [esp + 0x74]
push eax
call fcn.00424e57
push 1
mov byte [esp + 0xe4], 5
call fcn.00408907
call fcn.004256d7
cmp dword [esp + 0x88], 0xa
mov edi, eax
jle 0x4187b4
cmp edi, ebx
je 0x4187b4
mov esi, dword [esp + 0x20]
cmp dword [esi + 0x18], ebx
jne 0x4187b4
lea eax, [esp + 0x70]
call fcn.00424f31
push dword [ebp + 0xc]
mov dword [esi + 0x20], edi
lea esi, [esp + 0x74]
call fcn.004256ed
mov eax, esi
push eax
push dword [esp + 0x18]
call fcn.00424e57
mov ecx, esi
call fcn.0042523a
lea eax, [esp + 0x38]
push eax
mov byte [esp + 0xe4], 2
call fcn.004088df
lea ecx, [esp + 0xb0]
call fcn.0042523a
jmp 0x4187f9
lea ecx, [esp + 0x70]
call fcn.0042523a
lea eax, [esp + 0x38]
push eax
mov byte [esp + 0xe4], 2
call fcn.004088df
lea ecx, [esp + 0xb0]
mov byte [esp + 0xe0], 1
call fcn.0042523a
jmp 0x4187ec
push edi
call fcn.004602fe
pop ecx
push dword [ebp + 0xc]
mov ecx, dword [esp + 0x18]
call fcn.00418838
pop ecx
lea ecx, [esp + 0x90]
call fcn.0042523a
lea ecx, [esp + 0x50]
call fcn.0042523a
mov eax, dword [esp + 0x14]
mov ecx, dword [esp + 0xd8]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0xc0]
xor ecx, esp
call fcn.0045fbf1
mov esp, ebp
pop ebp
ret 8