Function at 0x408b90
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
push 0xffffffffffffffff
push 0x41fba8
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x1b0
mov eax, dword [0x4285e0]
mov edx, dword [ebp + 0x18]
push ebx
mov ebx, dword [ebp + 0xc]
xor eax, ebp
push esi
push edi
mov edi, dword [ebp + 8]
test edi, edi
mov esi, ecx
mov ecx, dword [ebp + 0x14]
mov dword [esp + 0x1b4], eax
mov eax, dword [ebp + 0x10]
mov dword [esp + 0x18], esi
mov dword [esp + 0x2c], eax
mov dword [esp + 0x24], ecx
mov dword [esp + 0x1c], edx
je 0x409191
cmp byte [edi], 0
je 0x409191
test ebx, ebx
je 0x409191
cmp byte [ebx], 0
je 0x409191
test eax, eax
jne 0x408c11
test ecx, ecx
je 0x409191
push edi
lea ecx, [esp + 0x4c]
call fcn.004029b0
push 1
push 1
lea eax, [esp + 0x50]
push eax
lea ecx, [esp + 0x8c]
push ecx
mov dword [esp + 0x1d4], 0
call fcn.0040b6e0
add esp, 0x10
push eax
lea edx, [esp + 0x18]
push edx
lea ecx, [esi + 0x1c]
mov byte [esp + 0x1cc], 1
call fcn.00407340
lea ecx, [esp + 0x80]
call fcn.00402600
lea ecx, [esp + 0x48]
mov dword [esp + 0x1c4], 0xffffffff
call fcn.00402600
mov eax, dword [esi + 0x20]
mov ecx, dword [esp + 0x14]
cmp ecx, eax
jne 0x408c95
push edi
push str._s_not_inserted
push 0xa
call fcn.0040add0
add esp, 0xc
jmp 0x4091a0
mov esi, dword [ecx + 0x28]
push ebx
lea ecx, [esp + 0x4c]
mov dword [esp + 0x2c], esi
call fcn.004029b0
push 1
push 0
lea eax, [esp + 0x50]
push eax
lea ecx, [esp + 0x70]
push ecx
mov dword [esp + 0x1d4], 2
call fcn.0040b6e0
add esp, 0x10
lea ecx, [esp + 0x48]
mov byte [esp + 0x1c4], 4
call fcn.00402600
mov eax, dword [esp + 0x7c]
xor edx, edx
mov dword [esp + 0x34], edx
mov dword [esp + 0x38], edx
mov edi, 0x10
mov dword [esp + 0x3c], edx
cmp eax, edi
mov eax, dword [esp + 0x68]
mov dword [esp + 0x40], edx
jae 0x408cff
lea eax, [esp + 0x68]
push 0x11000
push eax
push esi
call fcn.00403f90
mov esi, eax
add esp, 0xc
test esi, esi
mov dword [esp + 0x14], esi
je 0x408d4e
cmp dword [esp + 0x7c], edi
mov eax, dword [esp + 0x68]
jae 0x408d26
lea eax, [esp + 0x68]
mov edi, dword [esp + 0x28]
push 8
lea ecx, [esp + 0x38]
push ecx
push eax
push edi
call fcn.00404380
add esp, 0x10
test eax, eax
je 0x408d4e
push esi
call fcn.00403c00
mov edx, dword [edi + 4]
push edx
jmp 0x409137
mov ebx, dword [esp + 0x2c]
test ebx, ebx
mov byte [esp + 0x12], 0
je 0x408fdb
xor eax, eax
mov byte [esp + 0xa8], 0
mov ecx, 0x40
lea edi, [esp + 0xa9]
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
push 0x104
stosb byte es:[edi], al
lea eax, [esp + 0xac]
push ebx
push eax
call fcn.00410920
add esp, 0xc
lea ecx, [esp + 0xa8]
push ecx
call dword [sym.imp.SHLWAPI.dll_PathRemoveFileSpecA]
mov al, byte [esp + 0xa8]
test al, al
je 0x408de5
lea edx, [esp + 0xa8]
push edx
call fcn.0040b090
add esp, 4
test al, al
jne 0x408de5
test esi, esi
je 0x408dca
push esi
call fcn.00403c00
add esp, 4
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
lea eax, [esp + 0xac]
push eax
push str.Path_s__WinErr_d
push 3
jmp 0x40913e
xor edi, edi
push edi
push 0x20
push 2
push edi
push 3
push 0xc0000000
push ebx
call dword [sym.imp.KERNEL32.dll_CreateFileA]
cmp eax, 0xffffffff
mov dword [esp + 0x20], eax
jne 0x408e25
cmp esi, edi
je 0x408e11
push esi
call fcn.00403c00
add esp, 4
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push ebx
push str.File_s__WinErr_d
push 3
jmp 0x40913e
cmp dword [esp + 0x3c], edi
jle 0x408fd4
test byte [0x4298f0], 1
jne 0x408e66
or dword [0x4298f0], 1
push 0x4200c0
mov dword [0x4298e4], edi
mov dword [0x4298e8], edi
mov dword [0x4298ec], edi
call fcn.00411ce4
add esp, 4
mov byte [esp + 0x1c4], 4
mov ecx, dword [0x4298e4]
cmp ecx, edi
je 0x408e7e
mov eax, dword [0x4298e8]
sub eax, ecx
cmp eax, 0x1000
jae 0x408e8e
push edi
push 0x1000
mov ecx, 0x4298e0
call fcn.00402eb0
push edi
push edi
push esi
call fcn.00404210
mov ecx, dword [0x4298e4]
push 0x1000
push ecx
push esi
call fcn.00403d40
mov ebx, eax
add esp, 0x18
cmp ebx, 0x28
jbe 0x408edf
mov esi, dword [0x4298e4]
mov ecx, 0xa
lea edi, [esp + 0x80]
lea edx, [esp + 0x80]
rep movsd dword es:[edi], dword [esi]
mov ecx, dword [esp + 0x18]
push edx
call fcn.004065e0
mov esi, dword [esp + 0x14]
mov byte [esp + 0x12], al
xor edi, edi
test ebx, ebx
je 0x408f4c
push esi
add edi, ebx
call fcn.00403f60
mov ecx, dword [esp + 0x40]
add esp, 4
cmp eax, ecx
jge 0x408f4c
mov eax, dword [0x4298e4]
test eax, eax
mov edx, dword [0x4298e8]
jne 0x408f0b
xor ecx, ecx
jmp 0x408f0f
mov ecx, edx
sub ecx, eax
lea ebx, [edi + 0x1000]
cmp ecx, ebx
jae 0x408f35
test eax, eax
je 0x408f21
sub edx, eax
mov eax, edx
push 0
add eax, eax
push eax
mov ecx, 0x4298e0
call fcn.00402eb0
mov eax, dword [0x4298e4]
add eax, edi
push 0x1000
push eax
push esi
call fcn.00403d40
mov ebx, eax
add esp, 0xc
test ebx, ebx
jne 0x408ee5
mov cl, byte [esp + 0x12]
test cl, cl
mov eax, dword [0x4298e4]
mov dword [esp + 0x14], eax
mov dword [esp + 0x30], edi
je 0x408faa
lea ecx, [esp + 0x30]
push ecx
mov ecx, dword [esp + 0x1c]
lea edx, [esp + 0x18]
push edx
push edi
push eax
call fcn.00408a30
test al, al
jne 0x408fa6
push esi
call fcn.00403c00
mov eax, dword [esp + 0x24]
add esp, 4
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov ecx, dword [esp + 0x2c]
push eax
push ecx
push str.File_s__WinErr:__d
push 5
jmp 0x40913e
mov edi, dword [esp + 0x30]
mov eax, dword [esp + 0x14]
mov ebx, dword [esp + 0x20]
push 0
lea edx, [esp + 0x48]
push edx
push edi
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x409032
cmp dword [esp + 0x44], edi
jne 0x409032
mov ecx, dword [esp + 0x1c]
mov dword [ecx], edi
mov eax, ebx
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, dword [esp + 0x24]
test eax, eax
je 0x409165
mov ebx, dword [esp + 0x3c]
inc ebx
test bl, 3
je 0x408ff7
inc ebx
test bl, 3
jne 0x408ff1
test byte [0x4298f0], 2
jne 0x40905a
or dword [0x4298f0], 2
xor edi, edi
push 0x420080
mov dword [0x4298d4], edi
mov dword [0x4298d8], edi
mov dword [0x4298dc], edi
call fcn.00411ce4
add esp, 4
mov byte [esp + 0x1c4], 4
jmp 0x40905c
push esi
call fcn.00403c00
add esp, 4
push ebx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov edx, dword [esp + 0x2c]
push eax
push edx
push str.File_s__WinErr:__d
push 5
jmp 0x40913e
xor edi, edi
mov edx, dword [0x4298d4]
cmp edx, edi
mov ecx, dword [0x4298d8]
jne 0x409070
xor eax, eax
jmp 0x409074
mov eax, ecx
sub eax, edx
cmp eax, ebx
jae 0x409090
push edi
push ebx
mov ecx, 0x4298d0
call fcn.00402eb0
mov ecx, dword [0x4298d8]
mov edx, dword [0x4298d4]
cmp edx, edi
mov byte [esp + 0x13], 0
jne 0x40909d
xor eax, eax
jmp 0x4090a1
sub ecx, edx
mov eax, ecx
lea ecx, [esp + 0x13]
push ecx
push eax
mov ecx, 0x4298d0
call fcn.004087b0
cmp dword [esp + 0x3c], edi
jle 0x409151
push edi
push edi
push esi
call fcn.00404210
mov edx, dword [esp + 0x48]
mov eax, dword [0x4298d4]
push edx
push eax
push esi
call fcn.00403d40
mov ebx, dword [esp + 0x54]
add esp, 0x18
cmp eax, ebx
je 0x4090ef
push esi
call fcn.00403c00
mov ecx, dword [esp + 0x2c]
mov edx, dword [ecx + 4]
push edx
jmp 0x409137
cmp eax, 0x28
mov edi, dword [0x4298d4]
jbe 0x409108
mov ecx, dword [esp + 0x18]
push edi
call fcn.004065e0
mov byte [esp + 0x12], al
mov al, byte [esp + 0x12]
test al, al
je 0x40915f
mov eax, dword [esp + 0x1c]
mov ecx, dword [esp + 0x24]
push eax
push ecx
mov ecx, dword [esp + 0x20]
push ebx
push edi
call fcn.00408a30
test al, al
jne 0x409151
push esi
call fcn.00403c00
mov edx, dword [esp + 0x2c]
mov eax, dword [edx + 4]
push eax
push str.ziperr_d
push 0xe
call fcn.0040add0
add esp, 0x10
lea ecx, [esp + 0x64]
call fcn.00402600
jmp 0x4091a0
mov al, byte [esp + 0x12]
test al, al
jne 0x409165
mov edi, dword [0x4298d4]
mov ecx, dword [esp + 0x24]
mov dword [ecx], edi
test esi, esi
je 0x409172
push esi
call fcn.00403c00
add esp, 4
mov al, byte [esp + 0x12]
test al, al
jne 0x409184
mov edx, dword [esp + 0x3c]
mov eax, dword [esp + 0x1c]
mov dword [eax], edx
lea ecx, [esp + 0x64]
call fcn.00402600
mov al, 1
jmp 0x4091a2
push 0x421880
push 0xa
call fcn.0040add0
add esp, 8
xor al, al
mov ecx, dword [esp + 0x1bc]
mov dword fs:[0], ecx
mov ecx, dword [esp + 0x1b4]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.00410a75
mov esp, ebp
pop ebp
ret 0x14