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

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x4d7a50
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x220
push ebx
push esi
mov esi, dword [ebp + 0xc]
push edi
xor ebx, ebx
mov ecx, 0x81
xor eax, eax
lea edi, [ebp - 0x22a]
mov word [ebp - 0x22c], bx
mov dword [ebp - 0x10], esp
rep stosd dword es:[edi], eax
push ebx
push esi
mov dword [ebp - 0x18], 1
stosw word es:[edi], ax
call fcn.004a7ab0
add esp, 8
test eax, eax
push esi
jne 0x43f1a1
mov ecx, dword [0x6dcf84]
lea eax, [ebp - 0x22c]
push 0x103
push eax
push ecx
call fcn.004a7ac0
jmp 0x43f1b8
push 0x4eb504
lea edx, [ebp - 0x22c]
push 0x103
push edx
call dword [sym.imp.MSVCRT.dll__snwprintf]
add esp, 0x10
lea eax, [ebp - 0x22c]
push ebx
push eax
call fcn.004a7ab0
add esp, 8
test eax, eax
je 0x43f3ac
push ebx
push 0x8000080
push 3
push ebx
push 1
lea ecx, [ebp - 0x22c]
push connect
push ecx
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov edi, eax
push ebx
push edi
mov dword [ebp - 0x14], edi
mov dword [ebp - 4], ebx
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov ebx, eax
cmp ebx, 0xffffffff
jne 0x43f224
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, 1
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
lea edi, [ebx + 1]
push edi
call sub.MSVCRT.dll_void____cdecl_operator_new_unsigned_int_
mov ecx, edi
mov esi, eax
mov edx, ecx
xor eax, eax
mov edi, esi
add esp, 4
shr ecx, 2
rep stosd dword es:[edi], eax
mov ecx, edx
mov dword [ebp - 0x20], esi
and ecx, 3
test esi, esi
rep stosb byte es:[edi], al
je 0x43f37a
mov ecx, dword [ebp - 0x14]
lea eax, [ebp - 0x24]
push 0
push eax
push ebx
push esi
push ecx
call dword [sym.imp.KERNEL32.dll_ReadFile]
xor eax, eax
mov ah, byte [esi + 1]
mov al, byte [esi]
cmp ax, 0xfeff
jne 0x43f302
lea eax, [esi + 2]
test eax, eax
mov dword [ebp - 0x1c], eax
jne 0x43f285
xor edi, edi
mov dword [ebp + 0xc], edi
jmp 0x43f291
push eax
call dword [sym.imp.KERNEL32.dll_lstrlenW]
mov dword [ebp + 0xc], eax
mov edi, eax
mov ebx, dword [ebp + 0x10]
mov eax, dword [ebx]
cmp dword [eax - 0xc], 1
jg 0x43f2a1
cmp edi, dword [eax - 4]
jle 0x43f2b8
mov ecx, ebx
call fcn.00407610
push edi
mov ecx, ebx
call fcn.00407580
test eax, eax
je 0x43f35e
mov esi, dword [ebp - 0x1c]
lea eax, [edi + edi]
mov edi, dword [ebx]
mov ecx, eax
mov edx, ecx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
mov edx, dword [ebp + 0xc]
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov ecx, dword [ebx]
mov esi, dword [ebp - 0x20]
push esi
mov dword [ecx - 8], edx
mov ecx, dword [ebx]
mov word [eax + ecx], 0
call fcn.004d3765
mov edx, dword [ebp - 0x14]
add esp, 4
push edx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov dword [ebp - 4], 0xffffffff
jmp 0x43f3af
push esi
call dword [sym.imp.KERNEL32.dll_lstrlenA]
mov ebx, dword [ebp + 0x10]
mov edi, eax
mov eax, dword [ebx]
cmp dword [eax - 0xc], 1
jg 0x43f31b
cmp edi, dword [eax - 4]
jle 0x43f32e
mov ecx, ebx
call fcn.00407610
push edi
mov ecx, ebx
call fcn.00407580
test eax, eax
je 0x43f35e
lea eax, [edi + 1]
mov edi, dword [ebx]
test eax, eax
jne 0x43f33b
test edi, edi
jne 0x43f355
push eax
push edi
push 0xffffffffffffffff
push esi
push 0
push 0
call dword [sym.imp.KERNEL32.dll_MultiByteToWideChar]
test eax, eax
jle 0x43f355
mov word [edi + eax*2 - 2], 0
push 0xffffffffffffffff
mov ecx, ebx
call fcn.004107f0
push esi
call fcn.004d3765
mov edx, dword [ebp - 0x14]
add esp, 4
push edx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov dword [ebp - 4], 0xffffffff
jmp 0x43f3af
mov edx, dword [ebp - 0x14]
mov ebx, dword [ebp + 0x10]
push edx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov dword [ebp - 4], 0xffffffff
jmp 0x43f3af
mov ebx, dword [ebp + 0x10]
mov ecx, dword [ebp + 8]
cmp ecx, 0xffffffff
je 0x43f44c
mov edx, dword [ebx]
mov eax, dword [edx - 8]
test eax, eax
jne 0x43f44c
mov eax, dword [ebp + 0x14]
test eax, eax
je 0x43f44c
push eax
lea eax, [ebp + 0x10]
push 0x4f0538
push eax
push ecx
mov dword [ebp + 0x10], 0
call fcn.004ae7c0
mov esi, eax
add esp, 0x10
test esi, esi
je 0x43f3fa
push esi
call dword [sym.imp.KERNEL32.dll_lstrlenA]
mov edi, eax
jmp 0x43f3fc
xor edi, edi
mov eax, dword [ebx]
cmp dword [eax - 0xc], 1
jg 0x43f409
cmp edi, dword [eax - 4]
jle 0x43f41c
mov ecx, ebx
call fcn.00407610
push edi
mov ecx, ebx
call fcn.00407580
test eax, eax
je 0x43f44c
lea eax, [edi + 1]
mov edi, dword [ebx]
test eax, eax
jne 0x43f429
test edi, edi
jne 0x43f443
push eax
push edi
push 0xffffffffffffffff
push esi
push 0
push 0
call dword [sym.imp.KERNEL32.dll_MultiByteToWideChar]
test eax, eax
jle 0x43f443
mov word [edi + eax*2 - 2], 0
push 0xffffffffffffffff
mov ecx, ebx
call fcn.004107f0
mov ecx, dword [ebx]
mov eax, dword [ecx - 8]
test eax, eax
je 0x43f45c
mov dword [ebp - 0x18], 0
mov ecx, dword [ebp - 0xc]
mov eax, dword [ebp - 0x18]
pop edi
pop esi
mov dword fs:[0], ecx
pop ebx
mov esp, ebp
pop ebp
ret