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

Disassembly:
sub esp, 0xc
push ebx
mov eax, dword [esp + 0x14]
push edi
xor edi, edi
push edi
push 0x80
push 3
push edi
push 1
push bind
push eax
mov dword [esp + 0x24], edi
mov dword [esp + 0x28], edi
mov dword [esp + 0x2c], edi
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov ebx, eax
cmp ebx, 0xffffffff
je 0x1009c4ff
push ebp
push esi
push edi
push ebx
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov esi, eax
cmp esi, edi
je 0x1009c4df
cmp esi, 0xffffffff
je 0x1009c4df
push esi
call sub.MSVCRT.dll_void____cdecl_operator_new_unsigned_int_
add esp, 4
cmp eax, edi
mov dword [esp + 0x10], eax
je 0x1009c4df
mov edx, dword [esp + 0x10]
mov ecx, esi
mov ebp, ecx
xor eax, eax
mov edi, edx
push 0
shr ecx, 2
rep stosd dword es:[edi], eax
mov ecx, ebp
and ecx, 3
rep stosb byte es:[edi], al
lea ecx, [esp + 0x18]
push ecx
push esi
push edx
push ebx
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x1009c4db
cmp dword [esp + 0x14], esi
jne 0x1009c4db
push ebx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, dword [esp + 0x10]
push esi
push eax
push esi
push eax
mov edi, 0x10136cb8
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
dec ecx
push ecx
push 0x10136cb8
call fcn.1009d850
add esp, 0x18
test eax, eax
jne 0x1009c4e8
mov edx, dword [sym.imp.MSVCP60.dll_unsigned_int_const_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::npos]
mov ebp, dword [esp + 0x24]
mov edi, dword [sym.imp.MSVCP60.dll_void___cdecl_std::_Xlen_void_]
mov eax, dword [edx]
mov edx, dword [ebp + 8]
sub eax, edx
cmp eax, esi
ja 0x1009c446
call edi
test esi, esi
jbe 0x1009c4d4
mov ebx, dword [ebp + 8]
add ebx, esi
cmp ebx, 0xfffffffd
jbe 0x1009c45a
call edi
mov ecx, dword [ebp + 4]
xor edx, edx
cmp ecx, edx
je 0x1009c487
mov al, byte [ecx - 1]
test al, al
je 0x1009c487
cmp al, 0xff
je 0x1009c487
cmp ebx, edx
jne 0x1009c4a5
dec al
mov edi, 1
mov byte [ecx - 1], al
mov dword [ebp + 4], edx
mov dword [ebp + 8], edx
mov dword [ebp + 0xc], edx
jmp 0x1009c4ec
cmp ebx, edx
jne 0x1009c4a0
cmp ecx, edx
je 0x1009c4d4
push 0
mov ecx, ebp
call dword [sym.imp.MSVCP60.dll_private:_void___thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::_Eos_unsigned_int_]
mov edi, 1
jmp 0x1009c4ec
cmp dword [ebp + 0xc], ebx
jae 0x1009c4ae
push ebx
mov ecx, ebp
call dword [sym.imp.MSVCP60.dll_private:_void___thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::_Copy_unsigned_int_]
mov edi, dword [ebp + 8]
mov edx, dword [ebp + 4]
mov ecx, esi
mov esi, dword [esp + 0x10]
add edi, edx
mov edx, ecx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov eax, dword [ebp + 4]
mov dword [ebp + 8], ebx
mov byte [ebx + eax], 0
mov edi, 1
jmp 0x1009c4ec
mov edi, dword [esp + 0x18]
push ebx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
jmp 0x1009c4ec
mov edi, dword [esp + 0x18]
mov eax, dword [esp + 0x10]
pop esi
test eax, eax
pop ebp
je 0x1009c4ff
push eax
call sub.MSVCRT.dll_void___cdecl_operator_delete_void__
add esp, 4
mov eax, edi
pop edi
pop ebx
add esp, 0xc
ret 8