Function at 0x40462e
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x298
mov eax, dword [0x42733c]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
mov ebx, dword [ebp + 0x10]
push esi
mov esi, dword [ebp + 0xc]
xor eax, eax
push edi
mov edi, dword [ebp + 8]
mov dword [ebp - 0x290], ebx
mov dword [ebp - 0x280], eax
test ebx, ebx
je 0x4046d0
cmp byte [ebx], al
je 0x4046d0
test esi, esi
je 0x4046d0
push eax
push eax
push 2
push eax
push 1
push 0x40000000
push ebx
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov dword [ebp - 0x274], eax
cmp eax, 0xffffffff
jne 0x4046e3
push ebx
push 0x4012d8
lea eax, [ebp - 0x270]
push 0x26c
push eax
call fcn.0041a2bf
add esp, 0x10
cmp dword [0x428374], 0
jne 0x4046d0
push 1
call fcn.0040d3af
push 0x10
push 0x4012e8
lea eax, [ebp - 0x270]
push eax
push dword [0x429ea8]
call dword [sym.imp.USER32.dll_MessageBoxA]
push 0
call fcn.0040d3af
xor eax, eax
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.00419fba
leave
ret 0x10
cmp dword [esi + 8], 0
jne 0x4046ef
push esi
call fcn.00404d1f
push edi
call fcn.00408667
push eax
mov dword [ebp - 0x278], eax
call fcn.00406761
mov dword [ebp - 0x298], eax
test eax, eax
jne 0x404719
push dword [ebp - 0x274]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
jmp 0x4046d0
mov ecx, dword [ebp + 0x14]
mov eax, ecx
and eax, 0x20
mov dword [ebp - 0x284], eax
mov eax, 0x4012c0
mov ebx, 0x4013fc
jne 0x404735
mov ebx, eax
mov edx, ecx
and edx, 0x10
mov dword [ebp - 0x28c], edx
mov edi, 0x401408
jne 0x404749
mov edi, eax
mov edx, ecx
and edx, 8
mov dword [ebp - 0x294], edx
mov edx, 0x401414
jne 0x40475d
mov edx, eax
and ecx, 4
mov dword [ebp - 0x288], ecx
mov ecx, 0x401420
jne 0x40476f
mov ecx, eax
and dword [ebp + 0x14], 1
je 0x40477a
mov eax, 0x40142c
push ebx
mov ebx, dword [ebp - 0x298]
push edi
push edx
push ecx
push eax
push dword [esi + 0x1c]
lea eax, [ebp - 0x270]
push ebx
push 0x401438
push 0x26c
push eax
call fcn.0041a2bf
lea ecx, [ebp - 0x270]
add esp, 0x28
lea edx, [ecx + 1]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x4047ab
mov edi, dword [ebp - 0x274]
push 0
lea eax, [ebp - 0x27c]
push eax
sub ecx, edx
push ecx
lea eax, [ebp - 0x270]
push eax
push edi
call dword [sym.imp.KERNEL32.dll_WriteFile]
push ebx
push dword [ebp - 0x278]
call fcn.00406813
push dword [esi + 8]
call fcn.00413530
mov ebx, eax
test ebx, ebx
je 0x404915
push ebx
mov esi, 0x401330
call fcn.0040a79a
dec eax
je 0x404862
sub eax, 6
je 0x40484e
dec eax
je 0x404812
dec eax
je 0x40483a
dec eax
je 0x404826
dec eax
je 0x40484e
dec eax
jne 0x404871
cmp dword [ebp - 0x294], 0
je 0x4048ff
mov esi, 0x40146c
jmp 0x404871
cmp dword [ebp - 0x284], 0
je 0x4048ff
mov esi, 0x40147c
jmp 0x404871
cmp dword [ebp - 0x28c], 0
je 0x4048ff
mov esi, 0x401474
jmp 0x404871
cmp dword [ebp - 0x288], 0
je 0x4048ff
mov esi, 0x401464
jmp 0x404871
cmp dword [ebp + 0x14], 0
je 0x4048ff
mov esi, 0x401330
push ebx
call fcn.00407b8a
jmp 0x4048f5
push edi
call fcn.00408667
mov ecx, esi
mov dword [ebp - 0x278], eax
lea edx, [ecx + 1]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x40488a
push 0
lea eax, [ebp - 0x27c]
push eax
sub ecx, edx
push ecx
push esi
push dword [ebp - 0x274]
call dword [sym.imp.KERNEL32.dll_WriteFile]
mov edx, dword [ebp - 0x278]
mov ecx, edx
lea eax, [ecx + 1]
mov dword [ebp - 0x278], eax
mov al, byte [ecx]
inc ecx
test al, al
jne 0x4048bb
sub ecx, dword [ebp - 0x278]
push 0
lea eax, [ebp - 0x27c]
push eax
push ecx
push edx
push dword [ebp - 0x274]
call dword [sym.imp.KERNEL32.dll_WriteFile]
inc dword [ebp - 0x280]
push ebx
call fcn.00408667
cmp edi, eax
je 0x4048ff
push edi
call fcn.0041357f
mov edi, eax
test edi, edi
jne 0x404879
push ebx
call fcn.0041357f
mov ebx, eax
test ebx, ebx
jne 0x4047f0
mov edi, dword [ebp - 0x274]
push dword [ebp - 0x280]
lea eax, [ebp - 0x270]
push 0x401484
push 0x26c
push eax
call fcn.0041a2bf
lea ecx, [ebp - 0x270]
add esp, 0x10
lea edx, [ecx + 1]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x40493d
push 0
lea eax, [ebp - 0x27c]
push eax
sub ecx, edx
push ecx
lea eax, [ebp - 0x270]
push eax
push edi
call dword [sym.imp.KERNEL32.dll_WriteFile]
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, dword [ebp - 0x290]
jmp 0x4046d2