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

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x1007f8f8
mov eax, dword fs:[0]
push eax
sub esp, 0x24
mov eax, dword [0x1009d350]
xor eax, ebp
mov dword [ebp - 0x10], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov ebx, dword [ebp + 8]
mov dword [ebp - 0x24], ebx
mov dword [ebp - 0x30], 0
mov dword [ebp - 4], 0
mov eax, dword [0x1009d2a8]
mov ecx, 0x1009d2a8
call dword [eax + 0xc]
lea esi, [eax + 0x10]
mov dword [ebp - 0x20], esi
mov eax, 0x1009231d
mov byte [ebp - 4], 1
test eax, 0xffff0000
jne 0x1007869c
movzx edi, ax
mov ecx, edi
call fcn.100017b9
test eax, eax
je 0x100786ae
push edi
push eax
lea ecx, [ebp - 0x20]
call fcn.10007221
jmp 0x100786ab
push 0
push 0x1009231d
lea ecx, [ebp - 0x20]
call fcn.100081be
mov esi, dword [ebp - 0x20]
push 0
push 0
push 3
push 0
push 0
mov byte [ebp - 4], 2
push accept
push dword [ebp + 0xc]
mov dword [ebp - 0x18], 0x4c7a6f6d
mov dword [ebp - 0x14], 0x30347a
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov dword [ebp - 0x1c], eax
cmp eax, 0xffffffff
jne 0x10078787
mov ecx, dword [esi - 0x10]
lea edi, [esi - 0x10]
mov eax, dword [ecx]
call dword [eax + 0x10]
cmp dword [edi + 0xc], 0
lea edx, [edi + 0xc]
mov ecx, eax
jl 0x1007870b
cmp ecx, dword [edi]
jne 0x1007870b
mov esi, edi
mov eax, 1
lock xadd dword [edx], eax
jmp 0x1007873b
mov eax, dword [ecx]
push 1
push dword [edi + 4]
call dword [eax]
mov esi, eax
test esi, esi
jne 0x1007871f
call fcn.10008235
mov eax, dword [edi + 4]
mov dword [esi + 4], eax
mov ecx, dword [edi + 4]
inc ecx
push ecx
lea eax, [edi + 0x10]
push eax
push ecx
lea eax, [esi + 0x10]
push eax
call fcn.1004d8fb
add esp, 0x10
lea eax, [esi + 0x10]
or esi, 0xffffffff
mov dword [ebx], eax
mov byte [ebp - 4], 0
lea ecx, [edi + 0xc]
mov eax, esi
lock xadd dword [ecx], eax
dec eax
test eax, eax
jg 0x1007875d
mov ecx, dword [edi]
push edi
mov eax, dword [ecx]
call dword [eax + 4]
mov dword [ebp - 4], 0xffffffff
mov edi, dword [ebp + 0xc]
add edi, 0xfffffff0
lea eax, [edi + 0xc]
lock xadd dword [eax], esi
dec esi
test esi, esi
jg 0x10078995
mov ecx, dword [edi]
push edi
mov edx, dword [ecx]
call dword [edx + 4]
jmp 0x10078995
push 0
push eax
mov dword [ebp - 0x2c], 0
call dword [sym.imp.KERNEL32.dll_GetFileSize]
push eax
mov dword [ebp - 0x28], eax
call fcn.1004b5a0
add esp, 4
mov edi, eax
push 0
lea eax, [ebp - 0x2c]
push eax
push dword [ebp - 0x28]
push edi
push dword [ebp - 0x1c]
call dword [sym.imp.KERNEL32.dll_ReadFile]
push dword [ebp - 0x1c]
test eax, eax
jne 0x10078814
call dword [sym.imp.KERNEL32.dll_CloseHandle]
test edi, edi
je 0x100787d2
push edi
call fcn.1004d54b
add esp, 4
mov ecx, dword [esi - 0x10]
lea edi, [esi - 0x10]
mov eax, dword [ecx]
call dword [eax + 0x10]
cmp dword [edi + 0xc], 0
lea edx, [edi + 0xc]
mov ecx, eax
jl 0x100787fc
cmp ecx, dword [edi]
jne 0x100787fc
mov esi, edi
mov eax, 1
lock xadd dword [edx], eax
jmp 0x10078952
mov eax, dword [ecx]
push 1
push dword [edi + 4]
call dword [eax]
mov esi, eax
test esi, esi
jne 0x10078936
call fcn.10008235
call dword [sym.imp.KERNEL32.dll_CloseHandle]
cmp dword [ebp - 0x28], 0xc
jb 0x100787c5
lea ecx, [ebp - 0x18]
mov eax, dword [ecx]
cmp eax, dword [edi]
jne 0x100787c5
mov eax, dword [ecx + 4]
cmp eax, dword [edi + 4]
jne 0x100787c5
xor ecx, ecx
mov ebx, 8
xor edx, edx
lea ebx, [ebx]
movzx eax, byte [ebx + edi]
shl eax, cl
inc ebx
add ecx, 8
add edx, eax
cmp ebx, 0xc
jb 0x10078840
lea eax, [edx + 1]
push eax
mov dword [ebp - 0x1c], edx
call fcn.1004df72
add esp, 4
mov dword [ebp - 0x14], eax
test eax, eax
jne 0x100788d5
test edi, edi
je 0x10078874
push edi
call fcn.1004d54b
add esp, 4
lea edi, [esi - 0x10]
mov ecx, dword [edi]
mov eax, dword [ecx]
call dword [eax + 0x10]
cmp dword [edi + 0xc], 0
lea edx, [edi + 0xc]
mov ecx, eax
jl 0x100788a0
cmp ecx, dword [edi]
jne 0x100788a0
mov esi, edi
mov eax, 1
lock xadd dword [edx], eax
mov ebx, dword [ebp - 0x24]
jmp 0x10078952
mov eax, dword [ecx]
push 1
push dword [edi + 4]
call dword [eax]
mov esi, eax
test esi, esi
jne 0x100788b4
call fcn.10008235
mov eax, dword [edi + 4]
mov dword [esi + 4], eax
mov ecx, dword [edi + 4]
inc ecx
push ecx
lea eax, [edi + 0x10]
push eax
push ecx
lea eax, [esi + 0x10]
push eax
call fcn.1004d8fb
mov ebx, dword [ebp - 0x24]
add esp, 0x10
jmp 0x10078952
mov eax, dword [ebp - 0x28]
push dword [ebp - 0x1c]
sub eax, ebx
lea ecx, [ebx + edi]
mov ebx, dword [ebp - 0x14]
push eax
mov edx, ebx
call fcn.10018420
add esp, 8
push ebx
test eax, eax
jns 0x10078900
call fcn.1004c906
add esp, 4
jmp 0x10078867
mov eax, dword [ebp - 0x1c]
push 0x10092414
mov byte [ebx + eax], 0
lea eax, [ebp - 0x20]
push eax
call fcn.10009163
push ebx
call fcn.1004c906
add esp, 0x10
test edi, edi
je 0x1007892b
push edi
call fcn.1004d54b
add esp, 4
mov edi, dword [ebp - 0x20]
add edi, 0xfffffff0
jmp 0x10078877
mov eax, dword [edi + 4]
mov dword [esi + 4], eax
mov ecx, dword [edi + 4]
inc ecx
push ecx
lea eax, [edi + 0x10]
push eax
push ecx
lea eax, [esi + 0x10]
push eax
call fcn.1004d8fb
add esp, 0x10
lea eax, [esi + 0x10]
or esi, 0xffffffff
mov dword [ebx], eax
mov byte [ebp - 4], 0
lea ecx, [edi + 0xc]
mov eax, esi
lock xadd dword [ecx], eax
dec eax
test eax, eax
jg 0x10078974
mov ecx, dword [edi]
push edi
mov eax, dword [ecx]
call dword [eax + 4]
mov dword [ebp - 4], 0xffffffff
mov edx, dword [ebp + 0xc]
add edx, 0xfffffff0
lea eax, [edx + 0xc]
lock xadd dword [eax], esi
dec esi
test esi, esi
jg 0x10078995
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov eax, ebx
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.1004bbda
mov esp, ebp
pop ebp
ret 8