Function at 0x4061a0
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
mov eax, 0x4344
call fcn.00555270
mov eax, dword [0x5deba8]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 0xc]
push ebx
push esi
mov esi, dword [ebp + 0x14]
mov ebx, ecx
push edi
mov dword [ebp - 0x4340], ebx
mov dword [ebp - 0x4344], eax
cmp esi, 3
je 0x4061fd
cmp esi, 2
je 0x40632d
cmp esi, 1
je 0x40632d
pop edi
pop esi
mov eax, 0x10000
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0055338c
mov esp, ebp
pop ebp
ret 0x10
mov eax, dword [ebx + 0x20c]
mov esi, dword [ebp + 8]
cmp esi, eax
je 0x4062c4
cmp eax, 0xffffffff
je 0x40621e
mov edi, dword [ebx + 0x208]
call fcn.00405720
mov eax, dword [ebx + 0x208]
mov dword [ebx + 0x20c], 0xffffffff
cmp esi, dword [eax + 4]
jge 0x4061e5
cmp esi, dword [eax + 0x10]
jge 0x406242
mov esi, eax
call fcn.00404ea0
mov esi, dword [ebp + 8]
mov ecx, dword [ebx + 0x208]
cmp dword [ecx + 0x10], esi
jge 0x4062a8
lea ecx, [ecx]
mov esi, dword [ebx + 0x208]
test esi, esi
je 0x40629a
cmp dword [esi + 0x18], 0
je 0x40629a
mov eax, dword [esi + 0x10]
inc eax
cmp eax, dword [esi + 4]
je 0x40629a
mov edx, dword [esi + 0x50]
add edx, dword [esi + 0x4c]
mov ecx, dword [esi + 0x48]
push 0
mov dword [esi + 0x10], eax
lea edx, [edx + ecx + 0x2e]
add dword [esi + 0x14], edx
push 0
lea eax, [esi + 0x78]
push eax
lea ecx, [esi + 0x28]
push ecx
mov eax, esi
call fcn.00404a20
add esp, 0x10
neg eax
sbb eax, eax
inc eax
mov dword [esi + 0x18], eax
mov edx, dword [ebx + 0x208]
mov eax, dword [ebp + 8]
cmp dword [edx + 0x10], eax
jl 0x406250
mov ebx, dword [ebx + 0x208]
call fcn.00405390
mov edx, dword [ebp - 0x4340]
mov ecx, dword [ebp + 8]
mov dword [edx + 0x20c], ecx
mov ebx, edx
mov eax, dword [ebp - 0x4344]
mov ecx, dword [ebp + 0x10]
push eax
mov eax, dword [ebx + 0x208]
call fcn.004054a0
mov esi, eax
add esp, 4
test esi, esi
jle 0x4062fa
pop edi
pop esi
mov eax, 0x600
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0055338c
mov esp, ebp
pop ebp
ret 0x10
mov edi, dword [ebx + 0x208]
call fcn.00405720
mov eax, esi
neg eax
pop edi
sbb eax, eax
pop esi
mov dword [ebx + 0x20c], 0xffffffff
and eax, 0x5000000
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0055338c
mov esp, ebp
pop ebp
ret 0x10
cmp dword [ebx + 0x20c], 0xffffffff
je 0x406341
mov edi, dword [ebx + 0x208]
call fcn.00405720
mov eax, dword [ebx + 0x208]
mov edi, dword [ebp + 8]
mov dword [ebx + 0x20c], 0xffffffff
cmp edi, dword [eax + 4]
jge 0x4061e5
cmp edi, dword [eax + 0x10]
jge 0x40636c
mov esi, eax
call fcn.00404ea0
mov esi, dword [ebp + 0x14]
mov ecx, dword [ebx + 0x208]
cmp dword [ecx + 0x10], edi
jge 0x4063d8
jmp 0x406380
mov esi, dword [ebx + 0x208]
test esi, esi
je 0x4063ca
cmp dword [esi + 0x18], 0
je 0x4063ca
mov eax, dword [esi + 0x10]
inc eax
cmp eax, dword [esi + 4]
je 0x4063ca
mov edx, dword [esi + 0x50]
add edx, dword [esi + 0x4c]
mov ecx, dword [esi + 0x48]
push 0
mov dword [esi + 0x10], eax
lea edx, [edx + ecx + 0x2e]
add dword [esi + 0x14], edx
push 0
lea eax, [esi + 0x78]
push eax
lea ecx, [esi + 0x28]
push ecx
mov eax, esi
call fcn.00404a20
add esp, 0x10
neg eax
sbb eax, eax
inc eax
mov dword [esi + 0x18], eax
mov edx, dword [ebx + 0x208]
cmp dword [edx + 0x10], edi
jl 0x406380
mov esi, dword [ebp + 0x14]
push edi
lea edx, [ebp - 0x4338]
mov ecx, ebx
call fcn.00405980
test byte [ebp - 0x4230], 0x10
je 0x406427
cmp esi, 1
je 0x406412
lea eax, [ebp - 0x4334]
push eax
lea esi, [ebp - 0x20c]
call fcn.00404030
mov ecx, esi
push ecx
push ebx
call fcn.004060a0
add esp, 0xc
pop edi
pop esi
xor eax, eax
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0055338c
mov esp, ebp
pop ebp
ret 0x10
cmp esi, 1
jne 0x406437
mov esi, dword [ebp - 0x4344]
jmp 0x406538
mov edi, dword [ebp - 0x4344]
movzx eax, word [edi]
mov esi, edi
mov ecx, edi
test ax, ax
je 0x406512
lea ecx, [ecx]
cmp ax, 0x2f
je 0x40645c
cmp ax, 0x5c
jne 0x40645f
lea esi, [ecx + 2]
movzx eax, word [ecx + 2]
add ecx, 2
test ax, ax
jne 0x406450
cmp esi, edi
je 0x406512
lea edx, [ebp - 0x20c]
mov eax, edi
sub edx, edi
lea ecx, [ecx]
movzx ecx, word [eax]
mov word [edx + eax], cx
add eax, 2
test cx, cx
jne 0x406480
sub esi, edi
sar esi, 1
xor edx, edx
mov word [ebp + esi*2 - 0x20e], dx
mov ax, word [ebp - 0x20c]
cmp ax, 0x2f
je 0x4064c0
cmp ax, 0x5c
je 0x4064c0
cmp word [ebp - 0x20a], 0x3a
mov byte [ebp - 0x4339], dl
jne 0x4064c7
mov byte [ebp - 0x4339], 1
lea eax, [ebp - 0x20c]
push 0x5bad20
push eax
call fcn.00554ac7
lea ecx, [ebp - 0x20c]
push 0x5bad28
push ecx
mov esi, eax
call fcn.00554ac7
add esp, 0x10
test eax, eax
setne dl
test esi, esi
setne al
or dl, al
or dl, byte [ebp - 0x4339]
jne 0x406512
lea ecx, [ebp - 0x20c]
push ecx
push ebx
call fcn.004060a0
add esp, 8
mov eax, dword [ebp - 0x4230]
push 0
and eax, 0xfffffffe
push eax
push 2
push 0
push 0
push 0x40000000
push edi
mov dword [ebp - 0x4230], eax
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov esi, eax
cmp esi, 0xffffffff
jne 0x406555
pop edi
pop esi
mov eax, 0x200
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0055338c
mov esp, ebp
pop ebp
ret 0x10
mov ebx, dword [ebx + 0x208]
call fcn.00405390
mov edi, dword [ebp - 0x4340]
mov eax, dword [edi + 0x208]
lea edx, [ebp - 0x420c]
push edx
mov ecx, 0x4000
mov byte [ebp - 0x4339], 0
call fcn.004054a0
add esp, 4
test eax, eax
js 0x4065c9
mov ebx, dword [sym.imp.KERNEL32.dll_WriteFile]
je 0x4065d4
push 0
lea ecx, [ebp - 0x4340]
push ecx
push eax
lea edx, [ebp - 0x420c]
push edx
push esi
call ebx
test eax, eax
je 0x4065cd
lea eax, [ebp - 0x420c]
push eax
mov eax, dword [edi + 0x208]
mov ecx, 0x4000
call fcn.004054a0
add esp, 4
test eax, eax
jns 0x406591
mov bl, 1
jmp 0x4065da
mov byte [ebp - 0x4339], 1
mov bl, byte [ebp - 0x4339]
push esi
call dword [sym.imp.KERNEL32.dll_GetFileType]
cmp eax, 1
jne 0x406606
test bl, bl
jne 0x406606
lea ecx, [ebp - 0x421c]
push ecx
lea edx, [ebp - 0x422c]
push edx
lea eax, [ebp - 0x4224]
push eax
push esi
call dword [sym.imp.KERNEL32.dll_SetFileTime]
cmp dword [ebp + 0x14], 1
je 0x406613
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov edi, dword [edi + 0x208]
call fcn.00405720
mov ecx, dword [ebp - 4]
movzx eax, bl
neg eax
pop edi
sbb eax, eax
pop esi
xor ecx, ebp
and eax, 0x400
pop ebx
call fcn.0055338c
mov esp, ebp
pop ebp
ret 0x10