Function at 0x406430
Capabilities:
Write file on windows

Disassembly:
push 0xffffffffffffffff
push 0x46bbc0
mov eax, dword fs:[0]
push eax
sub esp, 0x80
mov eax, dword [0x4854a0]
xor eax, esp
mov dword [esp + 0x7c], eax
push ebx
push ebp
push esi
push edi
mov eax, dword [0x4854a0]
xor eax, esp
push eax
lea eax, [esp + 0x94]
mov dword fs:[0], eax
mov ebp, dword [esp + 0xa4]
mov ebx, ecx
xor edi, edi
mov eax, ebx
mov dword [ebp + 0x34], 0x40000000
mov dword [esp + 0x38], 0xf
mov dword [esp + 0x34], edi
mov byte [esp + 0x24], 0
lea esi, [eax + 1]
mov cl, byte [eax]
add eax, 1
test cl, cl
jne 0x406490
sub eax, esi
push eax
push ebx
lea ecx, [esp + 0x28]
call fcn.00403a90
push 0xffffffffffffffff
push edi
lea eax, [esp + 0x28]
lea ecx, [ebp + 0x14]
push eax
mov dword [esp + 0xa8], edi
call fcn.00402f60
mov dword [esp + 0x9c], 0xffffffff
cmp dword [esp + 0x38], 0x10
jb 0x4064dc
mov ecx, dword [esp + 0x24]
push ecx
call fcn.0041bf87
add esp, 4
mov edi, dword [esp + 0xac]
mov esi, ebp
call fcn.004060a0
push 0
push 0x80
push 2
push 0
push 0
push 0x40000000
push ebx
mov ebx, dword [sym.imp.KERNEL32.dll_CreateFileA]
call ebx
cmp eax, 0xffffffff
mov dword [ebp + 0x30], eax
jne 0x406517
mov eax, 2
jmp 0x406729
mov esi, 0x18
push esi
call fcn.0041bf5c
mov edx, dword [0x487dc0]
mov dword [ebp], eax
add esp, 4
mov word [eax], 0x4b50
mov eax, dword [ebp]
push 8
push edx
add eax, 2
push eax
call fcn.00438070
mov ecx, dword [ebp]
mov edx, dword [esp + 0xb4]
mov dword [ecx + 0xc], edx
mov eax, dword [ebp]
add esp, 0xc
mov dword [eax + 0x10], esi
mov ecx, dword [ebp]
push 0
lea edx, [esp + 0x20]
push edx
mov byte [ecx + 0x14], 0xbe
mov eax, dword [ebp]
mov ecx, dword [ebp + 0x30]
push esi
push eax
push ecx
mov dword [ebp + 0x38], 3
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
jne 0x406591
mov eax, ebp
call fcn.00412a10
mov eax, 6
jmp 0x406729
cmp dword [esp + 0x1c], esi
jne 0x406580
push str..bak
lea ecx, [esp + 0x40]
call fcn.00402480
mov edi, eax
mov dword [esp + 0x9c], 1
mov eax, dword [ebp + 0x28]
add eax, 0xfffffffc
push eax
xor ecx, ecx
lea esi, [esp + 0x5c]
lea edx, [ebp + 0x14]
call fcn.00402520
push edi
push eax
lea esi, [esp + 0x7c]
mov byte [esp + 0xa4], 2
call fcn.004053a0
add esp, 8
mov esi, 0x10
cmp dword [esp + 0x70], esi
jb 0x4065f5
mov edx, dword [esp + 0x5c]
push edx
call fcn.0041bf87
add esp, 4
xor edi, edi
mov dword [esp + 0x70], 0xf
mov dword [esp + 0x6c], edi
mov byte [esp + 0x5c], 0
mov byte [esp + 0x9c], 5
cmp dword [esp + 0x54], esi
jb 0x406623
mov eax, dword [esp + 0x40]
push eax
call fcn.0041bf87
add esp, 4
cmp dword [esp + 0x8c], esi
mov eax, dword [esp + 0x78]
mov dword [esp + 0x54], 0xf
mov dword [esp + 0x50], edi
mov byte [esp + 0x40], 0
jae 0x406645
lea eax, [esp + 0x78]
push edi
push 0x80
push 2
push edi
push edi
push 0x40000000
push eax
call ebx
mov esi, eax
cmp esi, 0xffffffff
jne 0x406678
mov eax, ebp
call fcn.00412a10
lea ecx, [esp + 0x74]
call fcn.004024c0
mov eax, 6
jmp 0x406729
mov edx, dword [ebp]
mov ebx, dword [sym.imp.KERNEL32.dll_WriteFile]
push edi
lea ecx, [esp + 0x18]
push ecx
push 4
add edx, 0x10
push edx
push esi
call ebx
test eax, eax
jne 0x4066b9
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, ebp
call fcn.00412a10
mov ecx, ebp
call fcn.00407b10
lea ecx, [esp + 0x74]
call fcn.004024c0
mov eax, 6
jmp 0x406729
cmp dword [esp + 0x14], 4
jne 0x406694
push edi
lea eax, [esp + 0x18]
push eax
push 4
lea ecx, [esp + 0x24]
push ecx
push esi
mov dword [esp + 0x2c], edi
call ebx
test eax, eax
je 0x406694
cmp dword [esp + 0x14], 4
push esi
jne 0x406695
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push 0x18
call fcn.0041bf5c
add esp, 4
cmp eax, edi
je 0x40670a
mov dword [eax], edi
mov dword [eax + 4], 1
mov dword [eax + 8], 2
mov byte [eax + 0x14], 1
jmp 0x40670c
xor eax, eax
mov esi, 0x100
mov edi, eax
mov dword [ebp + 0x140], eax
call fcn.0040e400
lea ecx, [esp + 0x74]
call fcn.004024c0
xor eax, eax
mov ecx, dword [esp + 0x94]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebp
pop ebx
mov ecx, dword [esp + 0x7c]
xor ecx, esp
call fcn.00436f5b
add esp, 0x8c
ret 0xc