Function at 0x41b540
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x480de8
mov eax, dword fs:[0]
push eax
sub esp, 0x38
push ebx
push esi
push edi
mov eax, dword [0x4c600c]
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 0x41b8e7
cmp al, 2
jne 0x41b61b
mov edx, dword [ebp + 0xc]
test edx, edx
je 0x41b8e7
mov eax, dword [ebp + 8]
jmp 0x41b590
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 0x41b5c8
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 0x41b5fd
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp byte [esi + 0x10], 0
jne 0x41b5ed
mov byte [esi + 0x10], 1
mov byte [esi + 0x15], 1
mov dword [esi + 0x18], 0x4a4304
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 0x41b590
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 - 0x34], esi
mov dword [ebp - 0x30], eax
xor ebx, ebx
mov eax, dword [ebp + 0xc]
mov dword [ebp - 0x44], 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 - 0x40], eax
mov dword [ebp - 0x3c], ebx
mov dword [ebp - 0x14], eax
mov dword [ebp - 0x38], eax
mov dword [ebp - 4], ebx
lea ecx, [ebp - 0x34]
call fcn.0041b900
test al, al
je 0x41b768
lea eax, [edi + 2]
push eax
lea ecx, [ebp - 0x44]
call fcn.00415630
test eax, eax
jne 0x41b782
cmp dword [esi + 0xc], 0x4b1
lea ecx, [ebp - 0x44]
mov ebx, dword [ebp - 0x3c]
mov eax, dword [ebp - 0x40]
mov dword [ebp - 0x24], ebx
mov dword [ebp - 0x14], eax
push 0
je 0x41b6c5
call fcn.00410369
push 1
lea ecx, [ebp - 0x44]
mov byte [eax], 0xff
call fcn.00410369
push edi
push dword [ebp - 0x10]
lea ecx, [ebp - 0x44]
mov byte [eax], 0xfe
call fcn.004103b5
add eax, 2
push eax
call fcn.00469ff0
add esp, 0xc
mov ecx, dword [ebp - 0x14]
mov edi, ebx
mov dword [ebp - 0x10], ecx
jmp 0x41b83a
call fcn.00410369
push 1
lea ecx, [ebp - 0x44]
mov byte [eax], 0xfe
call fcn.00410369
mov byte [eax], 0xff
test edi, edi
je 0x41b6b8
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 - 0x2c], eax
cmp dword [ebp - 0x44], 0
jne 0x41b754
mov eax, dword [ebp - 0x28]
add eax, edx
cmp eax, ebx
jae 0x41b754
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 - 0x2c]
cmp eax, ebx
jae 0x41b754
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 0x41b708
mov ecx, dword [ebp - 0x14]
mov edi, ebx
mov dword [ebp - 0x10], ecx
jmp 0x41b83a
push 0x1f1
mov edx, str.datavect_unsigned_char_::operator___
mov ecx, str._af___i_s_
call fcn.00417c20
cmp dword [esi + 0xc], 0x4b1
jne 0x41b837
push edi
lea ecx, [ebp - 0x44]
call fcn.00415630
test eax, eax
je 0x41b7c0
cmp byte [esi + 0x10], 0
jne 0x41b790
mov byte [esi + 0x14], 1
mov byte [esi + 0x10], 1
mov dword [ebp - 4], 0xffffffff
mov edx, dword [ebp - 0x40]
test edx, edx
je 0x41b8de
mov ecx, dword [ebp - 0x3c]
test ecx, ecx
je 0x41b8de
mov eax, edx
nop
mov byte [eax], 0
lea eax, [eax + 1]
sub ecx, 1
jne 0x41b7b0
jmp 0x41b8de
mov ebx, dword [ebp - 0x3c]
xor edx, edx
mov eax, dword [ebp - 0x40]
mov dword [ebp - 0x24], ebx
mov dword [ebp - 0x14], eax
test edi, edi
je 0x41b82e
mov ebx, 1
mov ecx, eax
sub ebx, eax
mov eax, dword [ebp - 0x10]
mov dword [ebp - 0x2c], ebx
mov ebx, eax
sub ebx, ecx
mov dword [ebp - 0x28], ebx
mov ebx, dword [ebp - 0x24]
jmp 0x41b7f0
cmp dword [ebp - 0x44], 0
jne 0x41b754
cmp edx, ebx
jae 0x41b754
mov al, byte [edx + eax + 1]
mov byte [ecx], al
mov eax, dword [ebp - 0x2c]
add eax, ecx
cmp eax, ebx
jae 0x41b754
mov eax, dword [ebp - 0x28]
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 0x41b7f0
mov eax, dword [ebp - 0x14]
mov ecx, eax
mov edi, ebx
mov dword [ebp - 0x10], ecx
jmp 0x41b83a
mov ecx, dword [ebp - 0x10]
test edi, edi
je 0x41b8bc
mov ebx, 0x10000
lea eax, [ebp - 0x2c]
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 0x41b876
mov eax, dword [ebp - 0x2c]
cmp eax, edi
mov ecx, dword [ebp - 0x10]
cmova eax, edi
mov byte [esi + 0x31], 1
add ecx, eax
sub edi, eax
jmp 0x41b8b5
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp byte [esi + 0x10], 0
mov dword [ebp - 0x20], str.WriteFile__
mov dword [ebp - 0x1c], 0xb
jne 0x41b8a9
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 0x41b842
mov dword [ebp - 4], 0xffffffff
mov edx, dword [ebp - 0x14]
test edx, edx
je 0x41b8de
mov eax, dword [ebp - 0x24]
test eax, eax
je 0x41b8de
mov ecx, edx
mov byte [ecx], 0
lea ecx, [ecx + 1]
sub eax, 1
jne 0x41b8d3
push edx
call fcn.0043af60
add esp, 4
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