Function at 0x100df9b0
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 connect
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 0x100dfb5f
push ebp
push esi
push edi
push ebx
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov esi, eax
cmp esi, edi
je 0x100dfb3f
cmp esi, 0xffffffff
je 0x100dfb3f
push esi
call sub.MSVCRT.dll_void____cdecl_operator_new_unsigned_int_
add esp, 4
cmp eax, edi
mov dword [esp + 0x10], eax
je 0x100dfb3f
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 0x100dfb3b
cmp dword [esp + 0x14], esi
jne 0x100dfb3b
push ebx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, dword [esp + 0x10]
push esi
push eax
push esi
push eax
mov edi, str.8CEFC9E6_A2B4_4c2a_823C_6903A31139FA
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
dec ecx
push ecx
push str.8CEFC9E6_A2B4_4c2a_823C_6903A31139FA
call fcn.100e0eb0
add esp, 0x18
test eax, eax
jne 0x100dfb48
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 0x100dfaa6
call edi
test esi, esi
jbe 0x100dfb34
mov ebx, dword [ebp + 8]
add ebx, esi
cmp ebx, 0xfffffffd
jbe 0x100dfaba
call edi
mov ecx, dword [ebp + 4]
xor edx, edx
cmp ecx, edx
je 0x100dfae7
mov al, byte [ecx - 1]
test al, al
je 0x100dfae7
cmp al, 0xff
je 0x100dfae7
cmp ebx, edx
jne 0x100dfb05
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 0x100dfb4c
cmp ebx, edx
jne 0x100dfb00
cmp ecx, edx
je 0x100dfb34
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 0x100dfb4c
cmp dword [ebp + 0xc], ebx
jae 0x100dfb0e
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 0x100dfb4c
mov edi, dword [esp + 0x18]
push ebx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
jmp 0x100dfb4c
mov edi, dword [esp + 0x18]
mov eax, dword [esp + 0x10]
pop esi
test eax, eax
pop ebp
je 0x100dfb5f
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