Function at 0x416470
Capabilities:
Read file on windows
Resolve function by parsing pe exports
Write file on windows

Disassembly:
sub esp, 0x880
mov eax, dword [0x425028]
xor eax, esp
mov dword [esp + 0x87c], eax
push ebx
push ebp
mov ebp, dword [esp + 0x88c]
push esi
mov eax, 1
xor ebx, ebx
push 0x3ff
mov dword [esp + 0x10], eax
mov dword [esp + 0x14], eax
lea eax, [esp + 0x8d]
push ebx
push eax
mov esi, ecx
mov byte [esp + 0x94], bl
call sub.MSVCR80.dll_memset
push 0x3ff
lea ecx, [esp + 0x499]
push ebx
push ecx
mov byte [esp + 0x4a0], bl
call sub.MSVCR80.dll_memset
mov eax, dword [0x41f9cc]
mov edx, dword [str.zbsharewarelog]
mov ecx, dword [0x41f9d0]
mov dword [esp + 0x3c], eax
mov al, byte [0x41f9d6]
push 0x31
mov dword [esp + 0x44], ecx
mov dword [esp + 0x3c], edx
mov dx, word [0x41f9d4]
mov byte [esp + 0x4a], al
xor eax, eax
lea ecx, [esp + 0x71]
push ebx
push ecx
mov word [esp + 0x50], dx
mov dword [esp + 0x53], eax
mov dword [esp + 0x57], eax
mov dword [esp + 0x5b], eax
mov dword [esp + 0x5f], eax
mov dword [esp + 0x63], eax
mov dword [esp + 0x67], eax
mov dword [esp + 0x6b], eax
mov dword [esp + 0x6f], eax
mov word [esp + 0x73], ax
mov byte [esp + 0x75], al
mov byte [esp + 0x38], 0xd
mov byte [esp + 0x39], 0xa
mov byte [esp + 0x3a], bl
mov dword [esp + 0x3b], eax
mov word [esp + 0x3f], ax
mov byte [esp + 0x41], al
mov byte [esp + 0x78], bl
call sub.MSVCR80.dll_memset
add esp, 0x24
cmp ebp, ebx
je 0x41670e
cmp esi, ebx
je 0x41670e
push edi
push ebx
push ebx
push 3
push ebx
push ebx
push 0x80000000
push esi
call dword [sym.imp.kernel32.dll_CreateFileW]
mov edi, eax
cmp edi, 0xffffffff
jne 0x4165ae
push eax
call dword [sym.imp.kernel32.dll_CloseHandle]
lea eax, [ebx + 4]
pop edi
mov ecx, dword [esp + 0x888]
pop esi
pop ebp
pop ebx
xor ecx, esp
call fcn.00417909
add esp, 0x880
ret 4
lea eax, [esp + 0x24]
lea edx, [eax + 1]
mov cl, byte [eax]
add eax, 1
cmp cl, bl
jne 0x4165b5
mov esi, dword [sym.imp.kernel32.dll_ReadFile]
sub eax, edx
push ebx
lea edx, [esp + 0x14]
push edx
push eax
lea eax, [esp + 0x64]
push eax
push edi
call esi
test eax, eax
je 0x4166fd
lea edx, [esp + 0x24]
lea ecx, [esp + 0x58]
mov al, byte [ecx]
cmp al, byte [edx]
jne 0x416605
cmp al, bl
je 0x416601
mov al, byte [ecx + 1]
cmp al, byte [edx + 1]
jne 0x416605
add ecx, 2
add edx, 2
cmp al, bl
jne 0x4165e5
xor eax, eax
jmp 0x41660a
sbb eax, eax
sbb eax, 0xffffffff
cmp eax, ebx
jne 0x4166fd
mov dword [esp + 0x10], 1
lea ebx, [ebx]
cmp byte [esp + 0x8c], 0xa
je 0x416643
push ebx
lea ecx, [esp + 0x14]
push ecx
push 1
lea edx, [esp + 0x98]
push edx
push edi
call esi
cmp dword [esp + 0x10], ebx
ja 0x416620
push ebx
push ebx
push 1
push ebx
push ebx
push 0xc0000000
push ebp
call dword [sym.imp.kernel32.dll_CreateFileW]
mov esi, eax
cmp esi, 0xffffffff
je 0x4166e6
cmp dword [esp + 0x10], ebx
jbe 0x4166d0
mov ebp, dword [sym.imp.kernel32.dll_WriteFile]
lea esp, [esp]
push ebx
lea eax, [esp + 0x14]
push eax
push 0x3e8
lea ecx, [esp + 0x98]
push ecx
push edi
call dword [sym.imp.kernel32.dll_ReadFile]
mov ecx, dword [esp + 0x10]
cmp ecx, ebx
jbe 0x4166d0
xor eax, eax
cmp ecx, ebx
jbe 0x4166b8
jmp 0x4166a0
mov dl, byte [esp + eax + 0x8c]
sub dl, 2
mov byte [esp + eax + 0x48c], dl
add eax, 1
cmp eax, ecx
jb 0x4166a0
push ebx
lea eax, [esp + 0x18]
push eax
push ecx
lea ecx, [esp + 0x498]
push ecx
push esi
call ebp
cmp dword [esp + 0x10], ebx
ja 0x416670
push esi
mov esi, dword [sym.imp.kernel32.dll_CloseHandle]
call esi
push edi
call esi
mov eax, 1
jmp 0x416593
mov esi, dword [sym.imp.kernel32.dll_CloseHandle]
push 0xffffffffffffffff
call esi
push edi
call esi
mov eax, 3
jmp 0x416593
push edi
call dword [sym.imp.kernel32.dll_CloseHandle]
mov eax, 6
jmp 0x416593
mov eax, 2
jmp 0x416594