Function at 0x41a800
Capabilities:
Check if file exists
Resolve function by parsing pe exports
Write file on windows

Disassembly:
push 0xffffffffffffffff
push 0x45a7ac
mov eax, dword fs:[0]
push eax
sub esp, 0xa64
mov eax, dword [0x4713c0]
xor eax, esp
mov dword [esp + 0xa60], eax
push ebx
push ebp
push esi
push edi
mov eax, dword [0x4713c0]
xor eax, esp
push eax
lea eax, [esp + 0xa78]
mov dword fs:[0], eax
mov esi, ecx
xor edi, edi
xor ebp, ebp
cmp esi, edi
je 0x41aa20
push 0x206
lea eax, [esp + 0x72]
push edi
push eax
mov word [esp + 0x78], di
call fcn.00446fa0
add esp, 0xc
push 0x104
lea ecx, [esp + 0x70]
push esi
push ecx
call fcn.00441e56
mov ebx, dword [sym.imp.SHLWAPI.dll_PathRemoveFileSpecW]
mov ebp, dword [sym.imp.SHLWAPI.dll_PathAppendW]
add esp, 0xc
mov word [esp + 0x272], di
mov dword [esp + 0x18], str.Microsoft.VC80.CRT.manifest
mov dword [esp + 0x1c], str.msvcm80.dll
mov dword [esp + 0x20], str.msvcp80.dll
mov dword [esp + 0x24], str.msvcr80.dll
mov dword [esp + 0x28], str.zlib.dll
mov dword [esp + 0x14], 1
xor esi, esi
lea ebx, [ebx]
lea edx, [esp + 0x6c]
push edx
call ebx
mov eax, dword [esp + esi*4 + 0x18]
push eax
lea ecx, [esp + 0x70]
push ecx
call ebp
lea edx, [esp + 0x6c]
push edx
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
je 0x41a8fe
lea eax, [esp + 0x6c]
push eax
call dword [sym.imp.SHLWAPI.dll_PathIsDirectoryW]
test eax, eax
jne 0x41a8fe
add esi, 1
cmp esi, 5
jb 0x41a8c0
jmp 0x41aa1c
lea ecx, [esp + 0x6c]
push ecx
push 0x464880
lea edx, [esp + 0x27c]
push 0x200
push edx
call fcn.004414db
add esp, 0x10
lea ecx, [esp + 0x50]
mov word [esp + 0x672], di
call fcn.0042bd40
mov dword [esp + 0xa80], edi
mov ebx, 7
lea eax, [esp + 0x274]
mov dword [esp + 0x30], ebx
mov dword [esp + 0x2c], edi
mov word [esp + 0x1c], di
lea edx, [eax + 2]
mov cx, word [eax]
add eax, 2
cmp cx, di
jne 0x41a951
sub eax, edx
sar eax, 1
push eax
lea eax, [esp + 0x278]
push eax
lea esi, [esp + 0x20]
call fcn.00406f80
mov ecx, esi
push edi
push ecx
or eax, 0xffffffff
lea esi, [esp + 0x58]
mov byte [esp + 0xa88], 1
call fcn.00406df0
mov ebp, 8
cmp dword [esp + 0x30], ebp
jb 0x41a9a2
mov edx, dword [esp + 0x1c]
push edx
call fcn.004415cb
add esp, 4
cmp dword [esp + 0x68], ebp
mov edx, dword [esp + 0x54]
mov dword [esp + 0x30], ebx
mov dword [esp + 0x2c], edi
mov word [esp + 0x1c], di
jae 0x41a9bd
lea edx, [esp + 0x54]
mov ebx, dword [0x474bb0]
cmp ebx, edi
je 0x41a9fa
mov eax, edx
lea esi, [eax + 2]
lea esp, [esp]
mov cx, word [eax]
add eax, 2
cmp cx, di
jne 0x41a9d0
sub eax, esi
sar eax, 1
push ebx
add eax, eax
push eax
push 1
push edx
call fcn.004422ed
mov ecx, dword [0x474bb0]
push ecx
call fcn.004428a9
add esp, 0x14
mov dword [esp + 0xa80], 0xffffffff
cmp dword [esp + 0x68], ebp
jb 0x41aa18
mov edx, dword [esp + 0x54]
push edx
call fcn.004415cb
add esp, 4
mov dword [esp + 0x14], edi
mov ebp, dword [esp + 0x14]
push ebp
push 0x464900
lea eax, [esp + 0x67c]
push 0x200
push eax
call fcn.004414db
add esp, 0x10
lea ecx, [esp + 0x34]
mov word [esp + 0xa72], di
call fcn.0042bd40
mov dword [esp + 0xa80], 2
mov ebx, 7
lea eax, [esp + 0x674]
mov dword [esp + 0x30], ebx
mov dword [esp + 0x2c], edi
mov word [esp + 0x1c], di
lea edx, [eax + 2]
mov cx, word [eax]
add eax, 2
cmp cx, di
jne 0x41aa73
sub eax, edx
sar eax, 1
push eax
lea ecx, [esp + 0x678]
push ecx
lea esi, [esp + 0x20]
call fcn.00406f80
mov edx, esi
push edi
push edx
or eax, 0xffffffff
lea esi, [esp + 0x3c]
mov byte [esp + 0xa88], 3
call fcn.00406df0
mov esi, 8
cmp dword [esp + 0x30], esi
jb 0x41aac4
mov eax, dword [esp + 0x1c]
push eax
call fcn.004415cb
add esp, 4
cmp dword [esp + 0x4c], esi
mov edx, dword [esp + 0x38]
mov dword [esp + 0x30], ebx
mov dword [esp + 0x2c], edi
mov word [esp + 0x1c], di
jae 0x41aadf
lea edx, [esp + 0x38]
mov ebx, dword [0x474bb0]
cmp ebx, edi
je 0x41ab20
mov eax, edx
lea esi, [eax + 2]
mov edi, edi
mov cx, word [eax]
add eax, 2
cmp cx, di
jne 0x41aaf0
sub eax, esi
sar eax, 1
push ebx
lea ecx, [eax + eax]
push ecx
push 1
push edx
call fcn.004422ed
mov edx, dword [0x474bb0]
push edx
call fcn.004428a9
add esp, 0x14
mov esi, 8
cmp dword [esp + 0x4c], esi
jb 0x41ab33
mov eax, dword [esp + 0x38]
push eax
call fcn.004415cb
add esp, 4
mov eax, ebp
mov ecx, dword [esp + 0xa78]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebp
pop ebx
mov ecx, dword [esp + 0xa60]
xor ecx, esp
call fcn.004414cc
add esp, 0xa70
ret