Function at 0x407100
Capabilities:
Get file size
Read file on windows
Write file on windows

Disassembly:
mov eax, 0x23774
call fcn.004315f0
mov eax, dword [0x45fce8]
xor eax, esp
mov dword [esp + 0x23770], eax
push ebp
push esi
mov esi, dword [esp + 0x23780]
push edi
mov edi, dword [esp + 0x23788]
lea eax, [esp + 0x678]
push eax
mov ebp, ecx
lea ecx, [esp + 0x26c]
push ecx
lea edx, [esp + 0x478]
push edx
lea eax, [esp + 0x580]
push eax
push esi
call fcn.0043207f
push 0
push 0
lea ecx, [esp + 0x180]
push ecx
lea edx, [esp + 0x38c]
push edx
push edi
call fcn.0043207f
lea eax, [esp + 0x290]
push eax
lea ecx, [esp + 0x190]
push ecx
lea edx, [esp + 0x39c]
push edx
lea eax, [esp + 0x94]
push str._s_s_s
push eax
call dword [sym.imp.USER32.dll_wsprintfA]
add esp, 0x3c
push 0
push 0x80
push 3
push 0
push 0
push connect
push esi
mov esi, dword [sym.imp.KERNEL32.dll_CreateFileA]
call esi
mov edi, eax
cmp edi, 0xffffffff
jne 0x4071c2
xor eax, eax
jmp 0x40730a
push ebx
push 0
push 0x80
push 2
push 0
push 0
push 0x40000000
lea ecx, [esp + 0x7c]
push ecx
call esi
mov ebx, eax
cmp ebx, 0xffffffff
je 0x407307
push 0
push edi
call dword [sym.imp.KERNEL32.dll_GetFileSize]
push 0x30
lea edx, [esp + 0x1c]
push 0
push edx
mov dword [ebp + 0x43fd4], eax
call fcn.00431410
add esp, 0xc
push 0
push 0
lea eax, [esp + 0x20]
push eax
call sub.wz_zp.dll_BZ2_bzDecompressInit
test eax, eax
jne 0x407307
push eax
lea ecx, [esp + 0x14]
push ecx
push 0x3000
lea edx, [esp + 0x78c]
push edx
push edi
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x40737a
mov esi, dword [sym.imp.KERNEL32.dll_WriteFile]
mov eax, dword [esp + 0x10]
je 0x407253
test eax, eax
je 0x407395
lea ecx, [esp + 0x780]
mov dword [esp + 0x18], ecx
mov dword [esp + 0x1c], eax
lea eax, [esp + 0x18]
lea edx, [esp + 0x3780]
push eax
mov dword [esp + 0x2c], edx
mov dword [esp + 0x30], 0x20000
call sub.wz_zp.dll_BZ2_bzDecompress
test eax, eax
je 0x407288
cmp eax, 4
jne 0x407307
mov eax, dword [esp + 0x2c]
cmp eax, 0x20000
jae 0x4072ad
push 0
lea ecx, [esp + 0x18]
push ecx
mov edx, 0x20000
sub edx, eax
push edx
lea eax, [esp + 0x378c]
push eax
push ebx
call esi
cmp dword [esp + 0x1c], 0
push 1
push 0
push 0
lea ecx, [esp + 0x54]
push 0
push ecx
je 0x407324
call dword [sym.imp.USER32.dll_PeekMessageA]
test eax, eax
je 0x4072e1
lea edx, [esp + 0x48]
push edx
call dword [sym.imp.USER32.dll_TranslateMessage]
lea eax, [esp + 0x48]
push eax
call dword [sym.imp.USER32.dll_DispatchMessageA]
cmp dword [ebp + 0x3fae8], 1
jne 0x407262
mov esi, dword [sym.imp.KERNEL32.dll_CloseHandle]
push edi
call esi
push ebx
call esi
lea ecx, [esp + 0x64]
push ecx
call fcn.004320c9
add esp, 4
xor eax, eax
pop ebx
mov ecx, dword [esp + 0x2377c]
pop edi
pop esi
pop ebp
xor ecx, esp
call fcn.0042fc1f
add esp, 0x23774
ret 8
call dword [sym.imp.USER32.dll_PeekMessageA]
test eax, eax
je 0x407344
lea edx, [esp + 0x48]
push edx
call dword [sym.imp.USER32.dll_TranslateMessage]
lea eax, [esp + 0x48]
push eax
call dword [sym.imp.USER32.dll_DispatchMessageA]
cmp dword [ebp + 0x3fae8], 1
je 0x4073b7
mov ecx, dword [esp + 0x20]
push 0
lea edx, [esp + 0x14]
push edx
push 0x3000
lea eax, [esp + 0x78c]
push eax
push edi
mov dword [ebp + 0x43fd8], ecx
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
jne 0x407245
mov esi, dword [sym.imp.KERNEL32.dll_CloseHandle]
push edi
call esi
push ebx
call esi
lea ecx, [esp + 0x18]
push ecx
call sub.wz_zp.dll_BZ2_bzDecompressEnd
jmp 0x407307
mov esi, dword [sym.imp.KERNEL32.dll_CloseHandle]
push edi
call esi
push ebx
call esi
lea edx, [esp + 0x18]
push edx
call sub.wz_zp.dll_BZ2_bzDecompressEnd
neg eax
sbb eax, eax
add eax, 1
jmp 0x407309
mov esi, dword [sym.imp.KERNEL32.dll_CloseHandle]
push edi
call esi
push ebx
call esi
lea eax, [esp + 0x64]
push eax
jmp 0x4072ff