Function at 0x4091e0
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x428a68
mov eax, dword fs:[0]
push eax
sub esp, 0x40
push ebx
push esi
push edi
mov eax, dword [0x443008]
xor eax, ebp
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov esi, ecx
mov al, byte [esi + 0x30]
cmp al, 1
je 0x4095a1
cmp al, 2
jne 0x4092bb
mov edx, dword [ebp + 0xc]
test edx, edx
je 0x4095a1
mov eax, dword [ebp + 8]
jmp 0x409230
mov edi, 0x4000
lea ecx, [ebp - 0x28]
push 0
cmp edx, edi
push ecx
cmovb edi, edx
push edi
push eax
push dword [esi + 0x2c]
call dword [sym.imp.KERNEL32.dll_WriteConsoleW]
test eax, eax
je 0x409268
mov edx, dword [ebp + 0xc]
mov ecx, dword [ebp - 0x28]
cmp ecx, edx
mov eax, dword [ebp + 8]
cmova ecx, edx
mov byte [esi + 0x31], 1
sub edx, ecx
lea eax, [eax + ecx*2]
jmp 0x40929d
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp byte [esi + 0x10], 0
jne 0x40928d
mov byte [esi + 0x10], 1
mov byte [esi + 0x15], 1
mov dword [esi + 0x18], str.WriteConsoleW__
mov dword [esi + 0x1c], 0xf
mov dword [esi + 0x20], eax
mov edx, dword [ebp + 0xc]
cmp edi, edx
mov eax, dword [ebp + 8]
cmova edi, edx
sub edx, edi
lea eax, [eax + edi*2]
mov dword [ebp + 0xc], edx
mov dword [ebp + 8], eax
test edx, edx
jne 0x409230
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 8
lea eax, [ebp + 8]
mov dword [ebp - 0x3c], esi
mov dword [ebp - 0x38], eax
xor ebx, ebx
mov eax, dword [ebp + 0xc]
mov dword [ebp - 0x4c], 0
mov dword [ebp - 0x24], ebx
lea edi, [eax + eax]
mov eax, dword [ebp + 8]
mov dword [ebp - 0x10], eax
xor eax, eax
mov dword [ebp - 0x48], eax
mov dword [ebp - 0x44], ebx
mov dword [ebp - 0x14], eax
mov dword [ebp - 0x40], eax
mov dword [ebp - 4], ebx
lea ecx, [ebp - 0x3c]
call fcn.004095c0
test al, al
je 0x409430
lea eax, [ebp - 0x30]
push eax
lea eax, [ebp - 0x2c]
push eax
lea eax, [edi + 2]
push eax
lea ecx, [ebp - 0x4c]
call fcn.00404970
test eax, eax
jne 0x40932b
mov eax, dword [ebp - 0x2c]
test eax, eax
je 0x409335
push dword [ebp - 0x30]
push ebx
push eax
call fcn.0041c060
add esp, 0xc
jmp 0x409335
cmp dword [ebp - 0x4c], 0
jne 0x40944a
cmp dword [esi + 0xc], 0x4b1
lea ecx, [ebp - 0x4c]
mov ebx, dword [ebp - 0x44]
mov eax, dword [ebp - 0x48]
mov dword [ebp - 0x24], ebx
mov dword [ebp - 0x14], eax
push 0
je 0x409389
call fcn.00409e30
push 1
lea ecx, [ebp - 0x4c]
mov byte [eax], 0xff
call fcn.00409e30
push edi
push dword [ebp - 0x10]
lea ecx, [ebp - 0x4c]
mov byte [eax], 0xfe
call fcn.00409e60
add eax, 2
push eax
call fcn.0041ba70
add esp, 0xc
mov ecx, dword [ebp - 0x14]
mov edi, ebx
mov dword [ebp - 0x10], ecx
jmp 0x4094fc
call fcn.00409e30
push 1
lea ecx, [ebp - 0x4c]
mov byte [eax], 0xfe
call fcn.00409e30
mov byte [eax], 0xff
test edi, edi
je 0x40937c
mov eax, dword [ebp - 0x14]
mov ecx, dword [ebp - 0x10]
mov dword [ebp - 0x28], 0xffffffff
sub dword [ebp - 0x28], eax
lea edx, [eax + 3]
mov dword [ebp - 0x1c], 0xfffffffd
sub dword [ebp - 0x1c], eax
mov eax, 3
sub eax, ecx
mov dword [ebp - 0x18], ecx
mov dword [ebp - 0x34], eax
lea esp, [esp]
cmp dword [ebp - 0x4c], 0
jne 0x40941c
mov eax, dword [ebp - 0x28]
add eax, edx
cmp eax, ebx
jae 0x40941c
mov eax, dword [ebp - 0x1c]
add eax, edx
mov al, byte [eax + ecx + 1]
mov ecx, dword [ebp - 0x10]
mov byte [edx - 1], al
mov eax, dword [ebp - 0x18]
add eax, dword [ebp - 0x34]
cmp eax, ebx
jae 0x40941c
mov eax, dword [ebp - 0x18]
add dword [ebp - 0x18], 2
mov al, byte [eax]
mov byte [edx], al
add edx, 2
mov eax, dword [ebp - 0x1c]
add eax, edx
cmp eax, edi
jb 0x4093d0
mov ecx, dword [ebp - 0x14]
mov edi, ebx
mov dword [ebp - 0x10], ecx
jmp 0x4094fc
push 0x1e8
mov edx, str.datavect_unsigned_char_::operator___
mov ecx, str._af___i_s_
call fcn.00406250
cmp dword [esi + 0xc], 0x4b1
jne 0x4094f9
push edi
lea ecx, [ebp - 0x4c]
call fcn.00404920
test eax, eax
je 0x409487
cmp byte [esi + 0x10], 0
jne 0x409458
mov byte [esi + 0x14], 1
mov byte [esi + 0x10], 1
mov dword [ebp - 4], 0xffffffff
mov ecx, dword [ebp - 0x48]
test ecx, ecx
je 0x40959c
mov edx, dword [ebp - 0x44]
test edx, edx
je 0x40959c
mov eax, ecx
mov byte [eax], 0
lea eax, [eax + 1]
sub edx, 1
jne 0x409477
jmp 0x40959c
mov ebx, dword [ebp - 0x44]
xor edx, edx
mov eax, dword [ebp - 0x48]
mov dword [ebp - 0x24], ebx
mov dword [ebp - 0x14], eax
test edi, edi
je 0x4094f0
mov ebx, 1
mov ecx, eax
sub ebx, eax
mov eax, dword [ebp - 0x10]
mov dword [ebp - 0x34], ebx
mov ebx, eax
sub ebx, ecx
mov dword [ebp - 0x30], ebx
mov ebx, dword [ebp - 0x24]
cmp dword [ebp - 0x4c], 0
jne 0x40941c
cmp edx, ebx
jae 0x40941c
mov al, byte [edx + eax + 1]
mov byte [ecx], al
mov eax, dword [ebp - 0x34]
add eax, ecx
cmp eax, ebx
jae 0x40941c
mov eax, dword [ebp - 0x30]
add edx, 2
mov al, byte [eax + ecx]
mov byte [ecx + 1], al
add ecx, 2
mov eax, dword [ebp - 0x10]
cmp edx, edi
jb 0x4094b2
mov eax, dword [ebp - 0x14]
mov ecx, eax
mov edi, ebx
mov dword [ebp - 0x10], ecx
jmp 0x4094fc
mov ecx, dword [ebp - 0x10]
test edi, edi
je 0x40957a
mov ebx, 0x10000
lea eax, [ebp - 0x34]
push 0
cmp edi, ebx
push eax
cmovb ebx, edi
push ebx
push ecx
push dword [esi + 0x2c]
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x409534
mov eax, dword [ebp - 0x34]
cmp eax, edi
mov ecx, dword [ebp - 0x10]
cmova eax, edi
mov byte [esi + 0x31], 1
add ecx, eax
sub edi, eax
jmp 0x409573
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp byte [esi + 0x10], 0
mov dword [ebp - 0x20], str.WriteFile__
mov dword [ebp - 0x1c], 0xb
jne 0x409567
mov byte [esi + 0x10], 1
mov byte [esi + 0x15], 1
mov dword [esi + 0x18], str.WriteFile__
mov dword [esi + 0x1c], 0xb
mov dword [esi + 0x20], eax
mov ecx, dword [ebp - 0x10]
cmp ebx, edi
cmova ebx, edi
add ecx, ebx
sub edi, ebx
mov dword [ebp - 0x10], ecx
test edi, edi
jne 0x409500
mov dword [ebp - 4], 0xffffffff
mov ecx, dword [ebp - 0x14]
test ecx, ecx
je 0x40959c
mov eax, dword [ebp - 0x24]
test eax, eax
je 0x40959c
mov edx, ecx
mov byte [edx], 0
lea edx, [edx + 1]
sub eax, 1
jne 0x409591
call fcn.0041a1e0
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 8