Function at 0x406de0
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
mov eax, 0x434c
call fcn.0043c5b0
mov eax, dword [0x45b080]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
mov ebx, dword [ebp + 0xc]
push esi
mov esi, dword [ebp + 0x14]
push edi
mov edi, ecx
mov dword [ebp - 0x4214], ebx
cmp esi, 3
je 0x40712f
cmp esi, 2
je 0x406e33
cmp esi, 1
je 0x406e33
mov eax, 0x10000
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00432b46
mov esp, ebp
pop ebp
ret 0x10
cmp dword [edi + 4], 0xffffffff
je 0x406e40
mov ecx, dword [edi]
call fcn.00406450
mov eax, dword [edi]
mov ecx, dword [ebp + 8]
mov dword [edi + 4], 0xffffffff
cmp ecx, dword [eax + 4]
jge 0x406e1b
cmp ecx, dword [eax + 0x10]
jge 0x406e60
mov ecx, eax
call fcn.00405d10
mov ecx, dword [ebp + 8]
mov eax, dword [edi]
cmp dword [eax + 0x10], ecx
jge 0x406ebd
mov esi, dword [edi]
test esi, esi
je 0x406eb3
cmp dword [esi + 0x18], 0
je 0x406eb3
mov edx, dword [esi + 0x10]
inc edx
cmp edx, dword [esi + 4]
je 0x406eb3
mov ecx, dword [esi + 0x50]
add ecx, dword [esi + 0x4c]
mov eax, dword [esi + 0x48]
add eax, 0x2e
sub esp, 0x10
add eax, ecx
add dword [esi + 0x14], eax
push 0
lea eax, [esi + 0x78]
mov dword [esi + 0x10], edx
push 0
push eax
lea edx, [esi + 0x28]
mov ecx, esi
call fcn.00405930
mov ecx, dword [ebp + 8]
add esp, 0x1c
neg eax
sbb eax, eax
inc eax
mov dword [esi + 0x18], eax
mov eax, dword [edi]
cmp dword [eax + 0x10], ecx
jl 0x406e67
mov esi, dword [ebp + 0x14]
lea eax, [ebp - 0x4348]
push eax
push ecx
mov ecx, edi
call fcn.00406580
test byte [ebp - 0x4240], 0x10
je 0x406f35
cmp esi, 1
je 0x406f20
push 0x206
lea eax, [ebp - 0x210]
push 0
push eax
call fcn.00437d40
add esp, 0xc
lea eax, [ebp - 0x210]
push 0x103
push eax
push 0xffffffffffffffff
lea eax, [ebp - 0x4344]
push eax
push 0
push 0
call dword [sym.imp.KERNEL32.dll_MultiByteToWideChar]
lea ecx, [edi + 0x138]
lea edx, [ebp - 0x210]
call fcn.00406ce0
xor eax, eax
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00432b46
mov esp, ebp
pop ebp
ret 0x10
cmp esi, 1
je 0x407043
movzx eax, word [ebx]
mov edx, ebx
mov ecx, ebx
test ax, ax
je 0x407027
mov edi, edi
cmp ax, 0x2f
je 0x406f5c
cmp ax, 0x5c
jne 0x406f5f
lea edx, [ecx + 2]
movzx eax, word [ecx + 2]
add ecx, 2
test ax, ax
jne 0x406f50
cmp edx, ebx
je 0x407027
lea esi, [ebp - 0x210]
mov ecx, ebx
sub esi, ebx
lea ecx, [ecx]
movzx eax, word [ecx]
mov word [esi + ecx], ax
lea ecx, [ecx + 2]
test ax, ax
jne 0x406f80
sub edx, ebx
sar edx, 1
lea edx, [edx*2 - 2]
cmp edx, 0x208
jae 0x40722d
xor eax, eax
mov word [ebp + edx - 0x210], ax
mov ax, word [ebp - 0x210]
cmp ax, 0x2f
je 0x406fd4
cmp ax, 0x5c
je 0x406fd4
cmp word [ebp - 0x20e], 0x3a
mov byte [ebp - 0x4349], 0
jne 0x406fdb
mov byte [ebp - 0x4349], 1
lea eax, [ebp - 0x210]
push 0x44ef24
push eax
call fcn.00433aa4
mov esi, eax
lea eax, [ebp - 0x210]
push 0x44ef2c
push eax
call fcn.00433aa4
add esp, 0x10
test eax, eax
setne cl
test esi, esi
setne al
or cl, al
or cl, byte [ebp - 0x4349]
jne 0x407027
lea ecx, [edi + 0x138]
lea edx, [ebp - 0x210]
call fcn.00406ce0
push 0
push dword [ebp - 0x4240]
push 2
push 0
push 0
push 0x40000000
push ebx
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov ebx, eax
cmp ebx, 0xffffffff
jne 0x407060
mov eax, 0x200
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00432b46
mov esp, ebp
pop ebp
ret 0x10
mov ecx, dword [edi]
call fcn.00406190
mov ecx, dword [edi]
push 0x4000
lea edx, [ebp - 0x4210]
mov byte [ebp - 0x4349], 0
call fcn.004062b0
add esp, 4
test eax, eax
js 0x4070c0
mov esi, dword [sym.imp.KERNEL32.dll_WriteFile]
je 0x4070c7
push 0
lea ecx, [ebp - 0x4214]
push ecx
push eax
lea eax, [ebp - 0x4210]
push eax
push ebx
call esi
test eax, eax
je 0x4070c0
mov ecx, dword [edi]
push 0x4000
lea edx, [ebp - 0x4210]
call fcn.004062b0
add esp, 4
test eax, eax
jns 0x40708d
mov byte [ebp - 0x4349], 1
push ebx
call dword [sym.imp.KERNEL32.dll_GetFileType]
cmp eax, 1
jne 0x4070f8
cmp byte [ebp - 0x4349], 0
jne 0x4070f8
lea eax, [ebp - 0x422c]
push eax
lea eax, [ebp - 0x423c]
push eax
lea eax, [ebp - 0x4234]
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_SetFileTime]
cmp dword [ebp + 0x14], 1
je 0x407105
push ebx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov ecx, dword [edi]
call fcn.00406450
xor eax, eax
cmp byte [ebp - 0x4349], al
mov ecx, 0x400
cmovne eax, ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00432b46
mov esp, ebp
pop ebp
ret 0x10
mov eax, dword [edi + 4]
mov esi, dword [ebp + 8]
cmp esi, eax
je 0x4071d3
cmp eax, 0xffffffff
je 0x407149
mov ecx, dword [edi]
call fcn.00406450
mov ecx, dword [edi]
mov dword [edi + 4], 0xffffffff
cmp esi, dword [ecx + 4]
jge 0x406e1b
cmp esi, dword [ecx + 0x10]
jge 0x407165
call fcn.00405d10
mov eax, dword [edi]
cmp dword [eax + 0x10], esi
jge 0x4071c9
mov ebx, esi
mov edi, edi
mov esi, dword [edi]
test esi, esi
je 0x4071b9
cmp dword [esi + 0x18], 0
je 0x4071b9
mov edx, dword [esi + 0x10]
inc edx
cmp edx, dword [esi + 4]
je 0x4071b9
mov ecx, dword [esi + 0x50]
add ecx, dword [esi + 0x4c]
mov eax, dword [esi + 0x48]
add eax, 0x2e
sub esp, 0x10
add eax, ecx
add dword [esi + 0x14], eax
push 0
lea eax, [esi + 0x78]
mov dword [esi + 0x10], edx
push 0
push eax
lea edx, [esi + 0x28]
mov ecx, esi
call fcn.00405930
add esp, 0x1c
neg eax
sbb eax, eax
inc eax
mov dword [esi + 0x18], eax
mov eax, dword [edi]
cmp dword [eax + 0x10], ebx
jl 0x407170
mov ebx, dword [ebp - 0x4214]
mov esi, dword [ebp + 8]
mov ecx, dword [edi]
call fcn.00406190
mov dword [edi + 4], esi
push dword [ebp + 0x10]
mov ecx, dword [edi]
mov edx, ebx
call fcn.004062b0
mov esi, eax
add esp, 4
test esi, esi
jle 0x407200
mov eax, 0x600
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00432b46
mov esp, ebp
pop ebp
ret 0x10
mov ecx, dword [edi]
call fcn.00406450
mov ecx, dword [ebp - 4]
neg esi
sbb esi, esi
and esi, 0x5000000
mov dword [edi + 4], 0xffffffff
pop edi
mov eax, esi
pop esi
xor ecx, ebp
pop ebx
call fcn.00432b46
mov esp, ebp
pop ebp
ret 0x10
call fcn.00433e71
int3