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

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
push 0xffffffffffffffff
push 0x41da5a
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
push ecx
mov eax, 0x1194
call fcn.0040f540
mov eax, dword [0x4255e0]
mov edx, dword [ebp + 0x18]
push ebx
mov ebx, dword [ebp + 0xc]
xor eax, ebp
push esi
mov esi, dword [ebp + 8]
test esi, esi
push edi
mov dword [esp + 0x119c], eax
mov eax, dword [ebp + 0x10]
mov edi, ecx
mov ecx, dword [ebp + 0x14]
mov dword [esp + 0x18], eax
mov dword [esp + 0x1c], ecx
mov dword [esp + 0x30], edx
je 0x406fa5
cmp byte [esi], 0
je 0x406fa5
test ebx, ebx
je 0x406fa5
cmp byte [ebx], 0
je 0x406fa5
test eax, eax
jne 0x406b82
test ecx, ecx
je 0x406fa5
push esi
lea ecx, [esp + 0x40]
call fcn.00402910
push 1
push 1
lea eax, [esp + 0x44]
push eax
lea ecx, [esp + 0x64]
push ecx
mov dword [esp + 0x11bc], 0
call fcn.004096a0
add esp, 0x10
push eax
lea edx, [esp + 0x18]
push edx
lea ecx, [edi + 0x1c]
mov byte [esp + 0x11b4], 1
call fcn.00405310
lea ecx, [esp + 0x58]
call fcn.004050d0
lea ecx, [esp + 0x3c]
mov dword [esp + 0x11ac], 0xffffffff
call fcn.004050d0
mov edi, dword [edi + 0x20]
mov eax, dword [esp + 0x14]
cmp eax, edi
jne 0x406c00
push esi
push str._s_not_inserted
push 0xa
call fcn.00408d90
add esp, 0xc
jmp 0x406fb4
mov edi, dword [eax + 0x28]
push ebx
lea ecx, [esp + 0x40]
mov dword [esp + 0x3c], edi
call fcn.00402910
push 1
push 0
lea eax, [esp + 0x44]
push eax
lea ecx, [esp + 0x80]
push ecx
mov dword [esp + 0x11bc], 2
call fcn.004096a0
add esp, 0x10
lea ecx, [esp + 0x3c]
mov byte [esp + 0x11ac], 4
call fcn.004050d0
mov eax, dword [esp + 0x8c]
xor edx, edx
mov dword [esp + 0x20], edx
mov dword [esp + 0x24], edx
mov ebx, 0x10
mov dword [esp + 0x28], edx
cmp eax, ebx
mov eax, dword [esp + 0x78]
mov dword [esp + 0x2c], edx
jae 0x406c70
lea eax, [esp + 0x78]
push 0x11000
push eax
push edi
call fcn.004038d0
mov esi, eax
add esp, 0xc
test esi, esi
mov dword [esp + 0x14], esi
je 0x406cbd
cmp dword [esp + 0x8c], ebx
mov eax, dword [esp + 0x78]
jae 0x406c9a
lea eax, [esp + 0x78]
push 8
lea ecx, [esp + 0x24]
push ecx
push eax
push edi
call fcn.00403cc0
add esp, 0x10
test eax, eax
je 0x406cbd
push esi
call fcn.00403540
mov edx, dword [edi + 4]
jmp 0x406f5b
mov ebx, dword [esp + 0x18]
test ebx, ebx
je 0x406e49
xor eax, eax
mov byte [esp + 0x90], 0
mov ecx, 0x40
lea edi, [esp + 0x91]
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
push 0x104
stosb byte es:[edi], al
lea eax, [esp + 0x94]
push ebx
push eax
call fcn.0040e860
add esp, 0xc
lea ecx, [esp + 0x90]
push ecx
call dword [sym.imp.SHLWAPI.dll_PathRemoveFileSpecA]
mov al, byte [esp + 0x90]
test al, al
je 0x406d4f
lea edx, [esp + 0x90]
push edx
call fcn.00409050
add esp, 4
test al, al
jne 0x406d4f
test esi, esi
je 0x406d34
push esi
call fcn.00403540
add esp, 4
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
lea eax, [esp + 0x94]
push eax
push str.Path_s__WinErr_d
push 3
jmp 0x406f63
push 0
push 0x20
push 2
push 0
push 3
push 0xc0000000
push ebx
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov ebx, eax
cmp ebx, 0xffffffff
jne 0x406d91
test esi, esi
je 0x406d79
push esi
call fcn.00403540
add esp, 4
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov ecx, dword [esp + 0x18]
push eax
push ecx
push str.File_s__WinErr_d
push 3
jmp 0x406f63
mov eax, dword [esp + 0x28]
test eax, eax
jle 0x406e42
mov byte [esp + 0x198], 0
xor eax, eax
mov ecx, 0x3ff
lea edi, [esp + 0x199]
rep stosd dword es:[edi], eax
push 0
stosw word es:[edi], ax
push 0
push esi
stosb byte es:[edi], al
call fcn.00403b50
push 0x1000
lea edx, [esp + 0x1a8]
push edx
push esi
call fcn.00403680
mov esi, eax
add esp, 0x18
test esi, esi
je 0x406e3e
mov edi, dword [sym.imp.KERNEL32.dll_WriteFile]
push 0
lea eax, [esp + 0x38]
push eax
push esi
lea ecx, [esp + 0x1a4]
push ecx
push ebx
call edi
test eax, eax
je 0x406ea1
cmp dword [esp + 0x34], esi
jne 0x406ea1
mov edx, dword [esp + 0x14]
push edx
call fcn.004038a0
mov ecx, dword [esp + 0x2c]
add esp, 4
cmp eax, ecx
jge 0x406e3e
mov ecx, dword [esp + 0x14]
push 0x1000
lea eax, [esp + 0x19c]
push eax
push ecx
call fcn.00403680
mov esi, eax
add esp, 0xc
test esi, esi
jne 0x406de4
mov esi, dword [esp + 0x14]
push ebx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, dword [esp + 0x1c]
test eax, eax
je 0x406f81
mov ebx, dword [esp + 0x28]
inc ebx
test bl, 3
je 0x406e66
nop
inc ebx
test bl, 3
jne 0x406e60
test byte [0x4268a4], 1
jne 0x406ecd
or dword [0x4268a4], 1
xor edi, edi
push 0x41de70
mov dword [0x426898], edi
mov dword [0x42689c], edi
mov dword [0x4268a0], edi
call fcn.004108e0
add esp, 4
mov byte [esp + 0x11ac], 4
jmp 0x406ecf
mov edx, dword [esp + 0x14]
push edx
call fcn.00403540
add esp, 4
push ebx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
mov eax, dword [esp + 0x1c]
push eax
push str.File_s__WinErr:__d
push 5
jmp 0x406f63
xor edi, edi
mov edx, dword [0x426898]
cmp edx, edi
mov ecx, dword [0x42689c]
jne 0x406ee3
xor eax, eax
jmp 0x406ee7
mov eax, ecx
sub eax, edx
cmp eax, ebx
jae 0x406f03
push edi
push ebx
mov ecx, 0x426894
call fcn.00405e60
mov ecx, dword [0x42689c]
mov edx, dword [0x426898]
cmp edx, edi
mov byte [esp + 0x13], 0
jne 0x406f10
xor eax, eax
jmp 0x406f14
sub ecx, edx
mov eax, ecx
lea ecx, [esp + 0x13]
push ecx
push eax
mov ecx, 0x426894
call fcn.004068b0
cmp dword [esp + 0x28], edi
jle 0x406f76
push edi
push edi
push esi
call fcn.00403b50
mov edx, dword [esp + 0x34]
mov eax, dword [0x426898]
push edx
push eax
push esi
call fcn.00403680
mov ecx, dword [esp + 0x40]
add esp, 0x18
cmp eax, ecx
je 0x406f76
push esi
call fcn.00403540
mov ecx, dword [esp + 0x3c]
mov edx, dword [ecx + 4]
push edx
push str.ziperr_d
push 0xe
call fcn.00408d90
add esp, 0x10
lea ecx, [esp + 0x74]
call fcn.004050d0
jmp 0x406fb4
mov eax, dword [0x426898]
mov ecx, dword [esp + 0x1c]
mov dword [ecx], eax
test esi, esi
je 0x406f8e
push esi
call fcn.00403540
add esp, 4
mov edx, dword [esp + 0x30]
mov eax, dword [esp + 0x28]
lea ecx, [esp + 0x74]
mov dword [edx], eax
call fcn.004050d0
mov al, 1
jmp 0x406fb6
push 0x41e67c
push 0xa
call fcn.00408d90
add esp, 8
xor al, al
mov ecx, dword [esp + 0x11a4]
mov dword fs:[0], ecx
mov ecx, dword [esp + 0x119c]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.0040e9b5
mov esp, ebp
pop ebp
ret 0x14