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

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x404400
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x1dc
push ebx
push esi
mov eax, dword [ebp + 8]
push edi
xor esi, esi
mov dword [ebp - 0x10], esp
push esi
push 0x80
push 3
push esi
push 3
push closesocket
push eax
mov dword [ebp - 0x20], esi
mov dword [0x4062ac], esi
mov dword [0x4062a8], esi
mov dword [ebp - 4], esi
call dword [sym.imp.KERNEL32.dll_CreateFileA]
lea ecx, [ebp - 0x14]
mov edi, eax
push ecx
push edi
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov ebx, dword [sym.imp.KERNEL32.dll_ReadFile]
lea edx, [ebp - 0x14]
mov dword [ebp - 0x24], eax
push esi
push edx
lea eax, [ebp - 0xf0]
push 0x40
push eax
push edi
call ebx
mov ecx, dword [ebp - 0xb4]
push esi
push esi
push ecx
push edi
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
lea edx, [ebp - 0x14]
push esi
push edx
lea eax, [ebp - 0x1e8]
push 0xf8
push eax
push edi
call ebx
mov dword [ebp - 0x1c], esi
mov ecx, dword [ebp - 0x1e2]
mov eax, dword [ebp - 0x1c]
and ecx, 0xffff
cmp eax, ecx
jge 0x4022cc
lea edx, [ebp - 0x14]
push 0
push edx
lea eax, [ebp - 0xa0]
push 0x28
push eax
push edi
call ebx
mov dword [ebp - 0x18], str..rsrc
lea eax, [ebp - 0xa0]
mov cl, byte [eax]
mov edx, dword [ebp - 0x18]
mov byte [ebp + 0xb], cl
cmp cl, byte [edx]
jne 0x4022be
test cl, cl
je 0x4022ba
mov cl, byte [eax + 1]
mov byte [ebp + 0xb], cl
cmp cl, byte [edx + 1]
jne 0x4022be
add eax, 2
add edx, 2
test cl, cl
mov dword [ebp - 0x18], edx
jne 0x402292
xor eax, eax
jmp 0x4022c3
sbb eax, eax
sbb eax, 0xffffffff
test eax, eax
je 0x4022cc
inc dword [ebp - 0x1c]
jmp 0x402260
mov eax, dword [ebp - 0x8c]
push 0
push 0
push eax
push edi
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
mov ecx, dword [ebp - 0x8c]
lea edx, [ebp - 0x14]
push 0
push edx
lea eax, [ebp - 0x44]
push 0x10
push eax
push edi
mov dword [ebp + 8], ecx
call ebx
mov eax, dword [ebp - 0x38]
mov edx, dword [ebp - 0x36]
mov ecx, eax
and edx, 0xffff
and ecx, 0xffff
add ecx, edx
cmp ecx, 0x64
jg 0x402602
mov ecx, dword [ebp - 0x36]
mov dword [ebp - 0x1c], 0
and eax, 0xffff
and ecx, 0xffff
add eax, ecx
mov ecx, dword [ebp - 0x1c]
cmp ecx, eax
jge 0x4025b0
lea eax, [ebp - 0x14]
push 0
push eax
lea ecx, [ebp - 0x30]
push 8
push ecx
push edi
call ebx
cmp dword [ebp - 0x30], 3
jne 0x4025cf
mov edx, dword [ebp - 0x2c]
mov eax, dword [ebp + 8]
and edx, 0x7fffffff
push 0
add edx, eax
push 0
push edx
push edi
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
lea eax, [ebp - 0x14]
push 0
push eax
lea ecx, [ebp - 0x58]
push 0x10
push ecx
push edi
call ebx
mov eax, dword [ebp - 0x4a]
and eax, 0xffff
lea edx, [eax + eax*2]
shl edx, 3
push edx
call sub.MSVCRT.dll_void____cdecl_operator_new_unsigned_int_
add esp, 4
mov dword [ebp - 0x20], eax
mov dword [ebp - 0x18], 0
mov eax, dword [ebp - 0x4a]
mov ecx, dword [ebp - 0x18]
and eax, 0xffff
cmp ecx, eax
jge 0x4025cf
lea ecx, [ebp - 0x14]
push 0
push ecx
lea edx, [ebp - 0x70]
push 8
push edx
push edi
call ebx
mov eax, dword [ebp - 0x6c]
test eax, 0x80000000
jbe 0x4025c1
mov ecx, dword [ebp + 8]
and eax, 0x7fffffff
push 0
add eax, ecx
push 0
push eax
push edi
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
lea eax, [ebp - 0x14]
push 0
push eax
lea ecx, [ebp - 0xb0]
push 0x10
push ecx
push edi
call ebx
lea edx, [ebp - 0x14]
push 0
push edx
lea eax, [ebp - 0x78]
push 8
push eax
push edi
call ebx
mov ecx, dword [ebp - 0x74]
mov edx, dword [ebp + 8]
push 0
add ecx, edx
push 0
push ecx
push edi
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
lea eax, [ebp - 0x14]
push 0
push eax
lea ecx, [ebp - 0x68]
push 0x10
push ecx
push edi
call ebx
mov eax, dword [ebp - 0x64]
test eax, eax
je 0x4025c1
mov edx, dword [ebp - 0x68]
mov ebx, dword [ebp - 0x94]
mov ecx, dword [ebp + 8]
sub edx, ebx
push 0
add edx, ecx
push 0
push edx
push edi
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
mov ecx, dword [ebp - 0x20]
lea eax, [esi + esi*2]
lea edx, [ebp - 0x14]
push 0
lea ebx, [ecx + eax*8]
push edx
push 0x18
push ebx
push edi
call dword [sym.imp.KERNEL32.dll_ReadFile]
mov eax, dword [ebp - 0x64]
mov edx, dword [ebp + 8]
mov dword [ebx + 0x10], eax
mov ecx, dword [ebp - 0x68]
sub ecx, dword [ebp - 0x94]
lea eax, [ecx + edx]
mov ecx, dword [ebp - 0x24]
mov dword [ebx + 0x14], eax
mov edx, dword [ebx + 0x10]
add eax, edx
cmp eax, ecx
jbe 0x402491
mov eax, dword [ebp - 0x20]
push eax
jmp 0x4025fa
inc esi
mov ecx, dword [ebp - 0x4a]
and ecx, 0xffff
cmp esi, ecx
jae 0x402530
lea edx, [ebp - 0x14]
push 0
push edx
lea eax, [ebp - 0x28]
push 4
push eax
push edi
call dword [sym.imp.KERNEL32.dll_ReadFile]
cmp dword [ebp - 0x28], 0x28
jne 0x402508
push 1
push 0
push 0xfffffffffffffffc
push edi
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
mov edx, dword [ebp - 0x20]
lea ecx, [esi + esi*2]
lea eax, [ebp - 0x14]
push 0
lea ebx, [edx + ecx*8]
push eax
push 0x18
push ebx
push edi
call dword [sym.imp.KERNEL32.dll_ReadFile]
push 1
push 0
push 0xffffffffffffffe8
push edi
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
mov dword [ebx + 0x14], eax
mov ecx, dword [ebx - 4]
push 1
push 0
sub eax, ecx
push 4
push edi
mov dword [ebx - 8], eax
inc esi
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
push 1
push 0
push 0
push edi
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
mov ecx, dword [ebp - 0x8c]
mov edx, dword [ebp - 0x90]
lea ecx, [edx + ecx - 0x3e8]
cmp eax, ecx
jbe 0x402492
cmp word [ebp - 0x4a], 1
je 0x402545
mov eax, dword [ebp - 0x20]
lea edx, [esi + esi*2]
mov dword [eax + edx*8 - 8], 0x2710
mov ecx, 0x20
mov edx, 0x20
cmp edx, 0x60
jg 0x402582
xor esi, esi
mov eax, dword [ebp - 0x4a]
and eax, 0xffff
cmp esi, eax
jae 0x40257d
mov ebx, dword [ebp - 0x20]
lea eax, [esi + esi*2]
lea eax, [ebx + eax*8]
xor ebx, ebx
mov bx, word [eax + 0xe]
cmp ecx, ebx
jne 0x40257a
cmp dword [eax + 4], edx
je 0x4025b0
inc esi
jmp 0x402556
add edx, 0x10
jmp case.0x402592.8
lea esi, [ecx - 4]
cmp esi, 0x1c
ja case.0x402592.8
xor eax, eax
mov al, byte [esi + 0x402628]
jmp dword [eax*4 + 0x402614]
mov ecx, 8
jmp 0x40254a
mov ecx, 0x18
jmp 0x40254a
mov ecx, 4
jmp 0x40254a
xor esi, esi
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov ecx, dword [ebp - 0x20]
test ecx, ecx
jne 0x4025e1
push ecx
jmp 0x4025fa
inc dword [ebp - 0x18]
jmp 0x40239a
mov eax, dword [ebp - 0x1c]
mov ecx, dword [ebp - 0x36]
inc eax
mov dword [ebp - 0x1c], eax
mov eax, dword [ebp - 0x38]
jmp 0x40231f
lea edx, [esi + esi*2]
push ecx
lea eax, [ecx + edx*8]
mov edx, dword [ecx + edx*8 + 0x10]
mov dword [0x4062ac], edx
mov eax, dword [eax + 0x14]
mov dword [0x4062a8], eax
call sub.MSVCRT.dll_void___cdecl_operator_delete_void__
add esp, 4
mov ecx, dword [ebp - 0xc]
pop edi
pop esi
mov dword fs:[0], ecx
pop ebx
mov esp, ebp
pop ebp
ret