Function at 0x405310
Capabilities:
Write file on windows

Disassembly:
mov eax, 0x1478
call fcn.004b7ac0
mov eax, dword [0x52e144]
xor eax, esp
mov dword [esp + 0x1474], eax
push esi
mov esi, dword [esp + 0x1488]
mov eax, ecx
push edi
mov edi, dword [eax + 4]
mov dword [esp + 0x1c], eax
cmp edi, 0xffffffff
jne 0x405346
xor al, al
jmp 0x4055b0
mov eax, dword [eax + 0xc]
push ebx
mov ebx, dword [esp + 0x1488]
push ebp
mov ebp, dword [esp + 0x1490]
mov dword [esp + 0x14], ebx
mov dword [esp + 0x1c], ebp
mov dword [esp + 0x18], eax
mov dword [esp + 0x20], esi
cmp ebp, 0x63d
jne 0x4053c7
push 0x420
lea eax, [esp + 0x50]
push 0
push eax
call fcn.004b6dc0
mov eax, dword [esi]
mov ecx, dword [esp + 0x24]
push eax
add esi, 4
lea edx, [esp + 0x6c]
push esi
push edx
mov dword [esp + 0x38], eax
mov dword [esp + 0x64], ebx
mov dword [esp + 0x68], ecx
mov dword [esp + 0x6c], ebp
mov dword [esp + 0x70], eax
call fcn.004b6e40
mov ecx, dword [esp + 0x38]
add esp, 0x18
push 0
lea eax, [esp + 0x14]
push eax
add ecx, 0x10
push ecx
lea edx, [esp + 0x58]
push edx
jmp 0x40557c
cmp ebp, 0x63c
je 0x405371
cmp ebp, 0x613
jne 0x405445
push esi
call dword [sym.imp.KERNEL32.dll_lstrlenA]
mov edi, eax
inc edi
mov dword [esp + 0x20], edi
cmp edi, 0x200
jbe 0x4053fd
mov edi, 0x200
mov dword [esp + 0x20], edi
mov byte [esi + 0x1ff], 0
mov eax, dword [esp + 0x14]
mov ecx, dword [esp + 0x18]
mov edx, dword [esp + 0x1c]
push edi
mov dword [esp + 0x50], eax
lea eax, [esp + 0x60]
push esi
push eax
mov dword [esp + 0x5c], ecx
mov dword [esp + 0x60], edx
mov dword [esp + 0x64], edi
call fcn.004b6e40
mov eax, dword [esp + 0x30]
add esp, 0xc
push 0
lea ecx, [esp + 0x14]
push ecx
mov ecx, dword [eax + 4]
add edi, 0x10
push edi
lea edx, [esp + 0x58]
push edx
push ecx
jmp 0x40557d
cmp ebp, 0x619
jne 0x405489
mov edx, dword [esi]
mov dword [esp + 0x2c], eax
mov eax, dword [esi + 4]
mov ecx, 0x10
push 0
mov dword [esp + 0x24], ecx
mov dword [esp + 0x38], ecx
mov ecx, dword [esi + 8]
mov dword [esp + 0x40], eax
lea eax, [esp + 0x14]
push eax
mov dword [esp + 0x40], edx
mov edx, dword [esi + 0xc]
mov dword [esp + 0x48], ecx
push 0x20
lea ecx, [esp + 0x34]
mov dword [esp + 0x50], edx
push ecx
jmp 0x4054d2
cmp ebp, 0x61a
jne 0x405501
mov edx, dword [esi]
mov ecx, 0x14
mov dword [esp + 0x20], ecx
mov dword [esp + 0x34], ecx
mov ecx, dword [esi + 8]
push 0
mov dword [esp + 0x30], eax
mov eax, dword [esi + 4]
mov dword [esp + 0x3c], edx
mov edx, dword [esi + 0xc]
mov dword [esp + 0x44], ecx
lea ecx, [esp + 0x14]
push ecx
mov dword [esp + 0x44], eax
mov eax, dword [esi + 0x10]
mov dword [esp + 0x4c], edx
push 0x24
lea edx, [esp + 0x34]
mov dword [esp + 0x54], eax
push edx
push edi
mov dword [esp + 0x44], ebp
mov dword [esp + 0x3c], ebx
call dword [sym.imp.KERNEL32.dll_WriteFile]
cmp dword [0x548d4c], 0
mov esi, eax
je 0x405585
push 0
push 1
call fcn.004136f0
add esp, 8
jmp 0x405585
cmp ebp, 0x61b
jne 0x40556e
push 0x1017
lea eax, [esp + 0x471]
push 0
push eax
call fcn.004b6dc0
mov ecx, dword [esp + 0x24]
mov eax, 0x1008
push eax
lea edx, [esp + 0x48c]
push esi
push edx
mov dword [esp + 0x38], eax
mov dword [esp + 0x484], ebx
mov dword [esp + 0x488], ecx
mov dword [esp + 0x48c], ebp
mov dword [esp + 0x490], eax
call fcn.004b6e40
add esp, 0x18
push 0
lea eax, [esp + 0x14]
push eax
push 0x1018
lea ecx, [esp + 0x478]
push ecx
jmp 0x40557c
push 0
lea edx, [esp + 0x14]
push edx
push 0x10
lea eax, [esp + 0x20]
push eax
push edi
call dword [sym.imp.KERNEL32.dll_WriteFile]
mov esi, eax
pop ebp
pop ebx
test esi, esi
jne 0x4055ae
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x6d
je 0x40533f
cmp eax, 0xe8
je 0x40533f
cmp eax, 6
je 0x40533f
mov al, 1
mov ecx, dword [esp + 0x147c]
pop edi
pop esi
xor ecx, esp
call fcn.004b6da3
add esp, 0x1478
ret 0xc