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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x25c
push ebx
push esi
push edi
mov dword [ebp - 0x24c], ecx
push eax
xor eax, eax
xor eax, eax
je 0x10002220
push ebp
adc byte [ecx], 0x58
pop eax
mov eax, dword [ebp - 0x24c]
mov ecx, dword [ebp + 8]
mov dword [eax + 4], ecx
mov edx, 1
test edx, edx
je 0x10002547
mov dword [ebp - 0x220], 0
mov ecx, 0x87
xor eax, eax
lea edi, [ebp - 0x21c]
rep stosd dword es:[edi], eax
push 0x220
lea eax, [ebp - 0x220]
push eax
mov ecx, dword [ebp + 8]
push ecx
call fcn.1000e7f0
add esp, 0xc
test eax, eax
jne 0x10002274
jmp 0x10002547
push 0
push 0x80
push 3
push 0
push 1
push accept
lea edx, [ebp - 0x104]
push edx
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov dword [ebp - 0x238], eax
cmp dword [ebp - 0x238], 0xffffffff
jne 0x100022ac
mov dword [ebp - 0x220], 1
lea eax, [ebp - 0x218]
push eax
mov ecx, dword [ebp - 0x238]
push ecx
call dword [sym.imp.KERNEL32.dll_GetFileSizeEx]
test eax, eax
jne 0x100022ce
mov dword [ebp - 0x220], 1
cmp dword [ebp - 0x20c], 0
jl 0x10002343
jg 0x100022e2
cmp dword [ebp - 0x210], 0
jbe 0x10002343
mov edx, dword [ebp - 0x20c]
cmp edx, dword [ebp - 0x214]
jg 0x10002343
jl 0x10002300
mov eax, dword [ebp - 0x210]
cmp eax, dword [ebp - 0x218]
jae 0x10002343
push 0
push 0
mov ecx, dword [ebp - 0x20c]
push ecx
mov edx, dword [ebp - 0x210]
push edx
mov eax, dword [ebp - 0x238]
push eax
call dword [sym.imp.KERNEL32.dll_SetFilePointerEx]
mov ecx, dword [ebp - 0x218]
sub ecx, dword [ebp - 0x210]
mov edx, dword [ebp - 0x214]
sbb edx, dword [ebp - 0x20c]
mov dword [ebp - 0x218], ecx
mov dword [ebp - 0x214], edx
push 0x220
lea eax, [ebp - 0x220]
push eax
mov ecx, dword [ebp + 8]
push ecx
call fcn.1000e640
add esp, 0xc
test eax, eax
jne 0x10002371
mov edx, dword [ebp - 0x238]
push edx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
jmp 0x10002547
cmp dword [ebp - 0x220], 1
je 0x1000238a
mov eax, dword [ebp - 0x218]
or eax, dword [ebp - 0x214]
test eax, eax
jne 0x1000239c
mov ecx, dword [ebp - 0x238]
push ecx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
jmp 0x1000222d
mov edx, dword [ebp - 0x218]
mov dword [ebp - 0x234], edx
mov eax, dword [ebp - 0x214]
mov dword [ebp - 0x230], eax
mov dword [ebp - 0x22c], 0
mov dword [ebp - 0x228], 0x100000
mov dword [ebp - 0x23c], 0
mov ecx, dword [ebp - 0x228]
push ecx
call sub.MSVCRT.dll_void____cdecl_operator_new_unsigned_int_
add esp, 4
mov dword [ebp - 0x240], eax
mov edx, dword [ebp - 0x240]
mov dword [ebp - 0x224], edx
cmp dword [ebp - 0x230], 0
jl 0x1000251a
jg 0x1000240f
cmp dword [ebp - 0x234], 0
jbe 0x1000251a
mov eax, dword [ebp - 0x228]
xor ecx, ecx
mov dword [ebp - 0x254], eax
mov dword [ebp - 0x250], ecx
mov edx, dword [ebp - 0x230]
cmp edx, dword [ebp - 0x250]
jl 0x10002457
jg 0x10002441
mov eax, dword [ebp - 0x234]
cmp eax, dword [ebp - 0x254]
jbe 0x10002457
mov ecx, dword [ebp - 0x228]
xor edx, edx
mov dword [ebp - 0x25c], ecx
mov dword [ebp - 0x258], edx
jmp 0x1000246f
mov eax, dword [ebp - 0x234]
mov dword [ebp - 0x25c], eax
mov ecx, dword [ebp - 0x230]
mov dword [ebp - 0x258], ecx
mov edx, dword [ebp - 0x25c]
mov dword [ebp - 0x22c], edx
push 0
lea eax, [ebp - 0x23c]
push eax
mov ecx, dword [ebp - 0x22c]
push ecx
mov edx, dword [ebp - 0x224]
push edx
mov eax, dword [ebp - 0x238]
push eax
call dword [sym.imp.KERNEL32.dll_ReadFile]
mov ecx, dword [ebp - 0x22c]
push ecx
mov edx, dword [ebp - 0x224]
push edx
mov eax, dword [ebp + 8]
push eax
call fcn.1000e640
add esp, 0xc
test eax, eax
jne 0x100024f1
mov ecx, dword [ebp + 8]
push ecx
call dword [sym.imp.WS2_32.dll_closesocket]
mov edx, dword [ebp - 0x224]
mov dword [ebp - 0x244], edx
mov eax, dword [ebp - 0x244]
push eax
call sub.MSVCRT.dll_void___cdecl_operator_delete_void__
add esp, 4
mov ecx, dword [ebp - 0x238]
push ecx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
jmp 0x10002551
mov edx, dword [ebp - 0x22c]
xor eax, eax
mov ecx, dword [ebp - 0x234]
sub ecx, edx
mov edx, dword [ebp - 0x230]
sbb edx, eax
mov dword [ebp - 0x234], ecx
mov dword [ebp - 0x230], edx
jmp 0x100023f3
mov eax, dword [ebp - 0x224]
mov dword [ebp - 0x248], eax
mov ecx, dword [ebp - 0x248]
push ecx
call sub.MSVCRT.dll_void___cdecl_operator_delete_void__
add esp, 4
mov edx, dword [ebp - 0x238]
push edx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
jmp 0x1000222d
mov eax, dword [ebp + 8]
push eax
call dword [sym.imp.WS2_32.dll_closesocket]
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 4