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

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x10097ab8
mov eax, dword fs:[0]
push eax
sub esp, 0x24
mov eax, dword [0x100bb2a8]
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 - 0x28], ebx
mov dword [ebp - 0x30], 0
mov dword [ebp - 4], 0
call fcn.10001e63
mov ecx, eax
test ecx, ecx
jne 0x1008e284
push 0x80004005
call fcn.10001bd3
mov eax, dword [ecx]
call dword [eax + 0xc]
lea esi, [eax + 0x10]
mov dword [ebp - 0x1c], esi
mov eax, 0x100a57dd
mov byte [ebp - 4], 1
test eax, 0xffff0000
jne 0x1008e2b9
movzx edi, ax
mov ecx, edi
call fcn.10001cf0
test eax, eax
je 0x1008e2cb
push edi
push eax
lea ecx, [ebp - 0x1c]
call fcn.10007d68
jmp 0x1008e2c8
push 0
push 0x100a57dd
lea ecx, [ebp - 0x1c]
call fcn.10008e96
mov esi, dword [ebp - 0x1c]
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 - 0x20], eax
cmp eax, 0xffffffff
jne 0x1008e398
mov ecx, dword [esi - 0x10]
lea edi, [esi - 0x10]
mov eax, dword [ecx]
call dword [eax + 0x10]
cmp dword [edi + 0xc], 0
mov ecx, eax
lea eax, [edi + 0xc]
jl 0x1008e322
cmp ecx, dword [edi]
jne 0x1008e322
mov esi, edi
lock inc dword [eax]
jmp 0x1008e350
mov eax, dword [ecx]
push 1
push dword [edi + 4]
call dword [eax]
mov esi, eax
test esi, esi
jne 0x1008e336
call fcn.10008e8b
mov eax, dword [edi + 4]
lea ecx, [esi + 0x10]
mov dword [esi + 4], eax
lea eax, [edi + 0x10]
mov edx, dword [edi + 4]
inc edx
push edx
push eax
call fcn.100010b0
add esp, 8
lea eax, [esi + 0x10]
mov byte [ebp - 4], 0
or esi, 0xffffffff
mov dword [ebx], eax
mov eax, esi
lock xadd dword [edi + 0xc], eax
dec eax
test eax, eax
jg 0x1008e370
mov ecx, dword [edi]
push edi
mov eax, dword [ecx]
call dword [eax + 4]
mov dword [ebp - 4], 0xffffffff
mov eax, dword [ebp + 0xc]
add eax, 0xfffffff0
lock xadd dword [eax + 0xc], esi
dec esi
test esi, esi
jg 0x1008e5ce
mov ecx, dword [eax]
push eax
mov edx, dword [ecx]
call dword [edx + 4]
jmp 0x1008e5ce
push 0
push eax
mov dword [ebp - 0x2c], 0
call dword [sym.imp.KERNEL32.dll_GetFileSize]
push eax
mov dword [ebp - 0x24], eax
call fcn.1005a95d
add esp, 4
mov edi, eax
lea eax, [ebp - 0x2c]
push 0
push eax
push dword [ebp - 0x24]
push edi
push dword [ebp - 0x20]
call dword [sym.imp.KERNEL32.dll_ReadFile]
push dword [ebp - 0x20]
test eax, eax
jne 0x1008e41f
call dword [sym.imp.KERNEL32.dll_CloseHandle]
test edi, edi
je 0x1008e3e3
push edi
call fcn.1005a1ac
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
mov ecx, eax
lea eax, [edi + 0xc]
jl 0x1008e407
cmp ecx, dword [edi]
jne 0x1008e407
mov esi, edi
lock inc dword [eax]
jmp 0x1008e58f
mov eax, dword [ecx]
push 1
push dword [edi + 4]
call dword [eax]
mov esi, eax
test esi, esi
jne 0x1008e575
call fcn.10008e8b
call dword [sym.imp.KERNEL32.dll_CloseHandle]
cmp dword [ebp - 0x24], 0xc
jb 0x1008e3d6
lea ecx, [ebp - 0x18]
mov eax, dword [ecx]
cmp eax, dword [edi]
jne 0x1008e3d6
mov eax, dword [ecx + 4]
cmp eax, dword [edi + 4]
jne 0x1008e3d6
xor ecx, ecx
mov ebx, 8
xor edx, edx
movzx eax, byte [ebx + edi]
inc ebx
shl eax, cl
add ecx, 8
add edx, eax
cmp ebx, 0xc
jb 0x1008e445
lea eax, [edx + 1]
mov dword [ebp - 0x20], edx
push eax
call fcn.1006442c
add esp, 4
mov dword [ebp - 0x14], eax
test eax, eax
jne 0x1008e514
test edi, edi
je 0x1008e47d
push edi
call fcn.1005a1ac
add esp, 4
lea ebx, [esi - 0x10]
mov ecx, dword [ebx]
mov eax, dword [ecx]
call dword [eax + 0x10]
cmp dword [ebx + 0xc], 0
mov ecx, eax
lea eax, [ebx + 0xc]
jl 0x1008e49d
cmp ecx, dword [ebx]
jne 0x1008e49d
mov esi, ebx
lock inc dword [eax]
jmp 0x1008e4cb
mov eax, dword [ecx]
push 1
push dword [ebx + 4]
call dword [eax]
mov esi, eax
test esi, esi
jne 0x1008e4b1
call fcn.10008e8b
mov eax, dword [ebx + 4]
lea ecx, [esi + 0x10]
mov dword [esi + 4], eax
lea eax, [ebx + 0x10]
mov edx, dword [ebx + 4]
inc edx
push edx
push eax
call fcn.100010b0
add esp, 8
mov edi, dword [ebp - 0x28]
lea eax, [esi + 0x10]
or esi, 0xffffffff
mov byte [ebp - 4], 0
mov dword [edi], eax
mov eax, esi
lock xadd dword [ebx + 0xc], eax
dec eax
test eax, eax
jg 0x1008e4ee
mov ecx, dword [ebx]
push ebx
mov eax, dword [ecx]
call dword [eax + 4]
mov dword [ebp - 4], 0xffffffff
mov edx, dword [ebp + 0xc]
add edx, 0xfffffff0
lock xadd dword [edx + 0xc], esi
dec esi
test esi, esi
jg 0x1008e50d
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov eax, edi
jmp 0x1008e5d0
mov eax, dword [ebp - 0x24]
lea ecx, [ebx + edi]
push dword [ebp - 0x20]
sub eax, ebx
mov ebx, dword [ebp - 0x14]
push eax
mov edx, ebx
call fcn.10018e70
add esp, 8
push ebx
test eax, eax
jns 0x1008e53f
call fcn.10063f6f
add esp, 4
jmp 0x1008e470
mov eax, dword [ebp - 0x20]
push 0x100a6b28
mov byte [ebx + eax], 0
lea eax, [ebp - 0x1c]
push eax
call fcn.100096bf
push ebx
call fcn.10063f6f
add esp, 0x10
test edi, edi
je 0x1008e56a
push edi
call fcn.1005a1ac
add esp, 4
mov ebx, dword [ebp - 0x1c]
add ebx, 0xfffffff0
jmp 0x1008e480
mov eax, dword [edi + 4]
lea ecx, [esi + 0x10]
mov dword [esi + 4], eax
lea eax, [edi + 0x10]
mov edx, dword [edi + 4]
inc edx
push edx
push eax
call fcn.100010b0
add esp, 8
lea eax, [esi + 0x10]
mov byte [ebp - 4], 0
or esi, 0xffffffff
mov dword [ebx], eax
mov eax, esi
lock xadd dword [edi + 0xc], eax
dec eax
test eax, eax
jg 0x1008e5af
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
lock xadd dword [edx + 0xc], esi
dec esi
test esi, esi
jg 0x1008e5ce
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.1005a19b
mov esp, ebp
pop ebp
ret 8