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

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x78
push ebx
push esi
push edi
xor eax, eax
lea edi, [ebp - 0x54]
stosd dword es:[edi], eax
xor esi, esi
stosd dword es:[edi], eax
stosd dword es:[edi], eax
stosd dword es:[edi], eax
push esi
push 0x100ba00
mov dword [ebp - 8], esi
mov dword [ebp - 0x18], esi
mov dword [ebp - 0xc], esi
mov dword [ebp - 0x30], esi
mov dword [ebp - 0x2c], esi
mov dword [ebp - 0x40], 0x800
mov dword [ebp - 0x3c], esi
mov dword [ebp - 0x1c], esi
stosd dword es:[edi], eax
mov dword [ebp - 4], esi
mov dword [ebp - 0x38], 0x7fffffff
mov dword [ebp - 0x34], esi
mov dword [0x100b4b4], esi
call sub.msvcrt.dll__setjmp3
pop ecx
pop ecx
test eax, eax
jne 0x100741a
call fcn.01006a8a
test eax, eax
jne 0x100741a
cmp dword [ebp + 0x10], esi
je 0x1007094
push dword [ebp + 0x10]
call fcn.0100625b
mov edi, eax
cmp edi, esi
je 0x100741a
push edi
push dword [ebp + 8]
push 0x1001648
push 1
call fcn.01006949
add esp, 0x10
push edi
push esi
mov ebx, eax
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push eax
call dword [sym.imp.KERNEL32.dll_HeapFree]
cmp ebx, 1
jmp 0x10070a9
push dword [ebp + 8]
push 0x10013b8
push 1
call fcn.01006949
add esp, 0xc
cmp eax, 1
jne 0x100741a
xor edi, edi
inc edi
push 0x1001320
mov dword [ebp - 0x1c], edi
call fcn.01006d4a
mov dword [ebp - 0x10], eax
cmp eax, 0xffffffff
je 0x100741a
mov ebx, dword [ebp + 0xc]
push 0x1001384
push ebx
call dword [sym.imp.msvcrt.dll__mbscmp]
pop ecx
pop ecx
test eax, eax
jne 0x10070ed
mov eax, dword [sym.imp.msvcrt.dll__iob]
mov dword [ebp - 8], eax
jmp 0x1007264
cmp dword [0x100c360], esi
jne 0x10071cf
push esi
push 0x80
push 3
push esi
push edi
push 0x80000000
push ebx
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov edi, eax
mov dword [ebp - 4], edi
cmp edi, esi
jne 0x100712b
call dword [sym.imp.msvcrt.dll__errno]
push dword [eax]
push ebx
call sub.MSWSOCK.dll_s_perror
jmp 0x100741a
lea eax, [ebp - 0x38]
push eax
push edi
call dword [sym.imp.KERNEL32.dll_GetFileSizeEx]
test eax, eax
je 0x100714a
cmp dword [ebp - 0x34], esi
jl 0x100715e
jg 0x100714a
cmp dword [ebp - 0x38], 0x7fffffff
jb 0x100715e
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov dword [ebp - 4], esi
mov dword [ebp - 0x38], 0x7fffffff
mov dword [ebp - 0x34], esi
cmp dword [0x100c360], esi
jne 0x10071cf
cmp dword [ebp - 0x34], esi
jg 0x10071cf
jl 0x1007176
cmp dword [ebp - 0x38], 0x7fffffff
jae 0x10071cf
push esi
push esi
push esi
push esi
call dword [sym.imp.KERNEL32.dll_CreateEventA]
mov dword [ebp - 0x44], eax
cmp eax, esi
jne 0x10071c4
push ebx
call fcn.0100565b
mov edi, eax
cmp edi, esi
je 0x10071b3
push edi
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
mov eax, dword [sym.imp.msvcrt.dll__iob]
add eax, 0x40
push eax
call fcn.01005f9f
add esp, 0xc
push edi
call dword [sym.imp.KERNEL32.dll_LocalFree]
push dword [ebp - 4]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov dword [ebp - 4], esi
jmp 0x100741a
mov dword [ebp - 0x4c], esi
mov dword [ebp - 0x48], esi
jmp 0x1007264
push dword [0x100c2c8]
push esi
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push eax
call dword [sym.imp.KERNEL32.dll_HeapAlloc]
push 0x1001644
push ebx
mov dword [ebp - 0xc], eax
call dword [sym.imp.msvcrt.dll_fopen]
pop ecx
pop ecx
mov dword [ebp - 8], eax
cmp eax, esi
je 0x1007118
mov edi, dword [sym.imp.msvcrt.dll_fclose]
mov ebx, dword [sym.imp.msvcrt.dll__fileno]
lea eax, [ebp - 0x78]
push eax
push dword [ebp - 8]
mov dword [ebp - 0x18], edi
call ebx
pop ecx
push eax
call dword [sym.imp.msvcrt.dll__fstat]
pop ecx
pop ecx
test eax, eax
jl 0x10073e8
mov eax, dword [ebp - 0x72]
and eax, 0xf000
mov ecx, 0x8000
cmp ax, cx
jne 0x10073e8
mov eax, dword [ebp - 8]
mov dword [0x100b4a8], eax
mov dword [0x100b4ac], edi
mov dword [ebp - 0x20], esi
call dword [sym.imp.msvcrt.dll__errno]
push dword [ebp - 8]
mov dword [eax], esi
call ebx
mov ebx, dword [ebp + 0xc]
pop ecx
mov dword [ebp - 0x24], eax
call dword [sym.imp.msvcrt.dll_clock]
mov dword [ebp - 0x28], eax
mov eax, dword [0x100c2c4]
cmp eax, 1
je 0x1007283
add eax, 0xfffffffd
cmp eax, 1
ja 0x100741a
cmp dword [0x100c360], esi
jne 0x1007303
cmp dword [ebp - 0x34], esi
jg 0x1007303
jl 0x100729b
cmp dword [ebp - 0x38], 0x7fffffff
jae 0x1007303
push 0x20
push esi
lea eax, [ebp - 0x54]
push eax
mov eax, dword [0x100c794]
neg eax
sbb eax, eax
and eax, dword [0x100c2c8]
push eax
push esi
push dword [ebp - 4]
push dword [ebp - 0x10]
call sub.MSWSOCK.dll_TransmitFile
test eax, eax
jne 0x10072ec
mov edi, dword [sym.imp.KERNEL32.dll_GetLastError]
call edi
cmp eax, 0x3e5
je 0x10072e8
push dword [ebp - 4]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov dword [ebp - 0x30], esi
mov dword [ebp - 0x2c], esi
call edi
push eax
jmp 0x1007120
push 1
jmp 0x10072ed
push esi
lea eax, [ebp - 0x30]
push eax
lea eax, [ebp - 0x54]
push eax
push dword [ebp - 0x10]
call dword [sym.imp.KERNEL32.dll_GetOverlappedResult]
jmp 0x100741a
mov edi, dword [sym.imp.msvcrt.dll_putchar]
mov ebx, dword [sym.imp.msvcrt.dll_fflush]
jmp 0x1007382
push dword [0x100c2c8]
push dword [ebp - 0xc]
push dword [ebp - 0x24]
call dword [sym.imp.msvcrt.dll__read]
add esp, 0xc
cmp eax, esi
mov dword [ebp - 0x14], eax
jle 0x100738a
push esi
push eax
push dword [ebp - 0xc]
push dword [ebp - 0x10]
call fcn.0100881d
cmp eax, esi
mov dword [ebp - 0x20], eax
jl 0x100738a
mov eax, dword [ebp - 0x14]
cdq
add dword [ebp - 0x30], eax
adc dword [ebp - 0x2c], edx
jmp 0x100737a
mov eax, dword [ebp - 0x2c]
cmp eax, dword [ebp - 0x3c]
jl 0x1007382
jg 0x100735f
mov eax, dword [ebp - 0x30]
cmp eax, dword [ebp - 0x40]
jb 0x1007382
add dword [ebp - 0x40], 0x800
push 0x23
adc dword [ebp - 0x3c], esi
call edi
mov eax, dword [sym.imp.msvcrt.dll__iob]
add eax, 0x20
push eax
call ebx
pop ecx
pop ecx
cmp dword [0x100c360], esi
jne 0x100734d
cmp dword [0x100b4b4], esi
je 0x1007311
cmp dword [0x100b4b4], esi
jne 0x100741a
cmp dword [0x100c360], esi
je 0x10073bb
cmp dword [ebp - 0x2c], esi
jl 0x10073bb
jg 0x10073aa
cmp dword [ebp - 0x30], esi
jbe 0x10073bb
push 0xa
call edi
mov eax, dword [sym.imp.msvcrt.dll__iob]
add eax, 0x20
push eax
call ebx
pop ecx
pop ecx
cmp dword [ebp - 0x14], esi
jge 0x10073d0
call dword [sym.imp.msvcrt.dll__errno]
push dword [eax]
push dword [ebp + 0xc]
call sub.MSWSOCK.dll_s_perror
cmp dword [ebp - 0x20], esi
jge 0x100741a
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push 0x2763
call fcn.01005b70
jmp 0x100741a
push dword [ebp + 0xc]
call fcn.0100565b
mov ebx, eax
cmp ebx, esi
je 0x1007414
mov eax, dword [sym.imp.msvcrt.dll__iob]
push ebx
add eax, 0x40
push 0x2762
push eax
call fcn.01005f9f
add esp, 0xc
push ebx
call dword [sym.imp.KERNEL32.dll_LocalFree]
push dword [ebp - 8]
call edi
pop ecx
call dword [sym.imp.msvcrt.dll_clock]
mov ebx, eax
cmp dword [0x100b4b4], esi
je 0x1007450
push 0x100163c
call fcn.0100682a
pop ecx
cmp eax, 4
jne 0x1007441
push esi
push esi
call fcn.010060b6
push esi
push 0x100b4b4
mov dword [ebp - 0x1c], esi
call dword [sym.imp.KERNEL32.dll_InterlockedExchange]
cmp dword [0x100c360], esi
jne 0x1007484
cmp dword [ebp - 0x34], esi
jg 0x1007484
jl 0x1007468
cmp dword [ebp - 0x38], 0x7fffffff
jae 0x1007484
cmp dword [ebp - 4], esi
je 0x10074a6
push dword [ebp - 4]
mov edi, dword [sym.imp.KERNEL32.dll_CloseHandle]
call edi
cmp dword [ebp - 0x44], esi
je 0x10074a6
push dword [ebp - 0x44]
call edi
jmp 0x10074a6
cmp dword [ebp - 0x18], esi
je 0x1007490
push dword [ebp - 8]
call dword [ebp - 0x18]
pop ecx
cmp dword [ebp - 0xc], esi
je 0x10074a6
push dword [ebp - 0xc]
push esi
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push eax
call dword [sym.imp.KERNEL32.dll_HeapFree]
mov eax, dword [0x100a364]
cmp eax, 0xffffffff
je 0x10074be
push eax
call dword [sym.imp.WS2_32.dll_closesocket]
or dword [0x100a364], 0xffffffff
mov dword [0x100b4a8], esi
mov dword [0x100b4ac], esi
cmp dword [ebp - 0x1c], esi
je 0x10074d7
push 1
push esi
call fcn.010060b6
cmp dword [ebp - 0x2c], esi
jl 0x10074fc
jg 0x10074e3
cmp dword [ebp - 0x30], esi
jbe 0x10074fc
cmp dword [0x100c790], esi
je 0x10074fc
push ebx
push dword [ebp - 0x28]
push dword [ebp - 0x2c]
push dword [ebp - 0x30]
push 1
call fcn.01006343
pop edi
pop esi
xor eax, eax
pop ebx
leave
ret 0xc