Function at 0x4029ae
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x44
mov ecx, dword [ebp + 0x10]
mov dword [ebp - 0xc], ecx
push esi
mov esi, dword [ebp + 8]
push edi
mov edi, dword [ebp + 0xc]
mov dword [ebp - 0x10], edi
test ecx, ecx
jne 0x4029d0
xor eax, eax
jmp 0x402bab
test edi, edi
jne 0x4029f3
call fcn.00407d76
and dword [eax], edi
call fcn.004042e7
mov dword [eax], 0x16
call fcn.00402406
or eax, 0xffffffff
jmp 0x402bab
push ebx
mov eax, esi
mov ebx, esi
sar ebx, 6
and eax, 0x3f
imul edx, eax, 0x30
mov dword [ebp - 8], ebx
mov eax, dword [ebx*4 + 0x417ef8]
mov dword [ebp - 0x2c], eax
mov dword [ebp - 4], edx
mov bl, byte [eax + edx + 0x29]
cmp bl, 2
je 0x402a1f
cmp bl, 1
jne 0x402a47
mov eax, ecx
not eax
test al, 1
jne 0x402a44
call fcn.00407d76
and dword [eax], 0
call fcn.004042e7
mov dword [eax], 0x16
call fcn.00402406
jmp 0x402b9f
mov eax, dword [ebp - 0x2c]
xor ecx, ecx
test byte [eax + edx + 0x28], 0x20
je 0x402a5f
push 2
push ecx
push ecx
push esi
call fcn.0040a8f9
add esp, 0x10
xor ecx, ecx
push esi
mov dword [ebp - 0x1c], ecx
mov dword [ebp - 0x18], ecx
mov dword [ebp - 0x14], ecx
call fcn.0040a29d
pop ecx
test al, al
je 0x402aac
test bl, bl
je 0x402a99
dec bl
cmp bl, 1
ja 0x402b3c
push dword [ebp - 0xc]
lea eax, [ebp - 0x28]
push edi
push eax
call fcn.0040a235
add esp, 0xc
mov esi, eax
jmp 0x402b33
push dword [ebp - 0xc]
lea eax, [ebp - 0x38]
push edi
push esi
push eax
call fcn.0040a085
add esp, 0x10
jmp 0x402a92
mov edx, dword [ebp - 8]
mov ecx, dword [ebp - 4]
mov eax, dword [edx*4 + 0x417ef8]
test byte [eax + ecx + 0x28], 0x80
je 0x402b02
movsx eax, bl
sub eax, 0
je 0x402af2
sub eax, 1
je 0x402ae2
sub eax, 1
jne 0x402b42
push dword [ebp - 0xc]
lea eax, [ebp - 0x38]
push edi
push esi
push eax
call fcn.0040a3f8
jmp 0x402aa7
push dword [ebp - 0xc]
lea eax, [ebp - 0x28]
push edi
push esi
push eax
call fcn.0040a4e4
jmp 0x402aa7
push dword [ebp - 0xc]
lea eax, [ebp - 0x44]
push edi
push esi
push eax
call fcn.0040a31b
jmp 0x402aa7
mov eax, dword [eax + ecx + 0x18]
lea ecx, [ebp - 0x24]
and dword [ebp - 0x28], 0
and dword [ebp - 0x24], 0
and dword [ebp - 0x20], 0
push 0
push ecx
push dword [ebp - 0xc]
push edi
push eax
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
jne 0x402b30
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp - 0x28], eax
lea esi, [ebp - 0x28]
lea edi, [ebp - 0x1c]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
mov edi, dword [ebp - 0x10]
mov ecx, dword [ebp - 4]
mov edx, dword [ebp - 8]
cmp dword [ebp - 0x18], 0
jne 0x402ba4
cmp dword [ebp - 0x1c], 0
je 0x402b75
push 5
pop esi
cmp dword [ebp - 0x1c], esi
jne 0x402b6a
call fcn.004042e7
mov dword [eax], 9
call fcn.00407d76
mov dword [eax], esi
jmp 0x402b9f
push dword [ebp - 0x1c]
call fcn.00404646
pop ecx
jmp 0x402b9f
mov eax, dword [edx*4 + 0x417ef8]
test byte [eax + ecx + 0x28], 0x40
je 0x402b8c
cmp byte [edi], 0x1a
jne 0x402b8c
xor eax, eax
jmp 0x402baa
call fcn.004042e7
mov dword [eax], 0x1c
call fcn.00407d76
and dword [eax], 0
or eax, 0xffffffff
jmp 0x402baa
mov eax, dword [ebp - 0x18]
sub eax, dword [ebp - 0x14]
pop ebx
pop edi
pop esi
mov esp, ebp
pop ebp
ret