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

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x10087b40
mov eax, dword fs:[0]
push eax
sub esp, 0x24
mov eax, dword [0x100a5688]
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 edi, dword [ebp + 8]
mov dword [ebp - 0x24], edi
mov dword [ebp - 0x30], 0
push 0x1009e38a
lea ecx, [ebp - 0x1c]
mov dword [ebp - 4], 0
call fcn.10003f00
xor ebx, ebx
push ebx
push ebx
push 3
push ebx
push ebx
mov byte [ebp - 4], 1
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 - 0x20], eax
cmp eax, 0xffffffff
jne 0x100825dc
mov eax, dword [ebp - 0x1c]
add eax, 0xfffffff0
push eax
call fcn.10004f20
mov byte [ebp - 4], bl
mov edx, dword [ebp - 0x1c]
add eax, 0x10
add edx, 0xfffffff0
or esi, 0xffffffff
mov dword [edi], eax
add esp, 4
lea ecx, [edx + 0xc]
mov eax, esi
lock xadd dword [ecx], eax
dec eax
test eax, eax
jg 0x100825b2
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov dword [ebp - 4], 0xffffffff
mov ebx, dword [ebp + 0xc]
add ebx, 0xfffffff0
lea eax, [ebx + 0xc]
lock xadd dword [eax], esi
dec esi
test esi, esi
jg 0x1008267e
mov ecx, dword [ebx]
push ebx
mov edx, dword [ecx]
call dword [edx + 4]
jmp 0x1008267e
push 0
push eax
mov dword [ebp - 0x2c], ebx
call dword [sym.imp.KERNEL32.dll_GetFileSize]
push eax
mov dword [ebp - 0x28], eax
call fcn.10056012
add esp, 4
mov esi, eax
push 0
lea eax, [ebp - 0x2c]
push eax
push dword [ebp - 0x28]
push esi
push dword [ebp - 0x20]
call dword [sym.imp.KERNEL32.dll_ReadFile]
push dword [ebp - 0x20]
test eax, eax
jne 0x1008269e
call dword [sym.imp.KERNEL32.dll_CloseHandle]
test esi, esi
je 0x10082627
push esi
call fcn.1005aa81
add esp, 4
mov eax, dword [ebp - 0x1c]
add eax, 0xfffffff0
push eax
call fcn.10004f20
mov byte [ebp - 4], bl
mov edx, dword [ebp - 0x1c]
add eax, 0x10
add edx, 0xfffffff0
or esi, 0xffffffff
mov dword [edi], eax
add esp, 4
lea ecx, [edx + 0xc]
mov eax, esi
lock xadd dword [ecx], eax
dec eax
test eax, eax
jg 0x1008265d
mov ecx, dword [edx]
push edx
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 0x1008267e
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov eax, edi
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.1005ae75
mov esp, ebp
pop ebp
ret 8
call dword [sym.imp.KERNEL32.dll_CloseHandle]
cmp dword [ebp - 0x28], 0xc
jb 0x1008261a
lea ecx, [ebp - 0x18]
mov eax, dword [ecx]
cmp eax, dword [esi]
jne 0x1008261a
mov eax, dword [ecx + 4]
cmp eax, dword [esi + 4]
jne 0x1008261a
mov edi, 8
xor ecx, ecx
mov edi, edi
movzx eax, byte [edi + esi]
shl eax, cl
inc edi
add ecx, 8
add ebx, eax
cmp edi, 0xc
jb 0x100826d0
lea eax, [ebx + 1]
push eax
call fcn.1005b532
add esp, 4
mov dword [ebp - 0x20], eax
test eax, eax
jne 0x10082719
test esi, esi
je 0x10082701
push esi
call fcn.1005aa81
add esp, 4
mov eax, dword [ebp - 0x1c]
add eax, 0xfffffff0
push eax
call fcn.10004f20
mov edi, dword [ebp - 0x24]
mov byte [ebp - 4], 0
jmp 0x10082636
mov eax, dword [ebp - 0x28]
sub eax, edi
lea ecx, [edi + esi]
mov edi, dword [ebp - 0x20]
push ebx
push eax
mov edx, edi
call fcn.1000c4e0
add esp, 8
push edi
test eax, eax
jns 0x1008273f
call fcn.1005a079
add esp, 4
jmp 0x100826f4
lea eax, [ebp - 0x1c]
push 0x1009e300
push eax
mov byte [edi + ebx], 0
call fcn.10004b70
push edi
call fcn.1005a079
add esp, 0x10
jmp 0x100826f4