Function at 0x411536
Capabilities:
Write file on windows

Disassembly:
push ebp
lea ebp, [esp - 0x5d4]
sub esp, 0x654
mov eax, dword [0x45c530]
xor eax, ebp
mov dword [ebp + 0x5d0], eax
cmp dword [ebp + 0x5e8], 3
push ebx
mov ebx, dword [ebp + 0x5e0]
push esi
push edi
mov esi, ecx
je 0x411589
cmp dword [ebp + 0x5e8], 2
je 0x411635
cmp dword [ebp + 0x5e8], 1
je 0x411635
mov eax, 0x10000
jmp 0x4118bb
mov eax, dword [esi + 4]
mov edi, dword [ebp + 0x5dc]
cmp edi, eax
je 0x4115db
cmp eax, 0xffffffff
je 0x4115a3
push dword [esi]
call fcn.0040f79a
pop ecx
mov eax, dword [esi]
or dword [esi + 4], 0xffffffff
cmp edi, dword [eax + 4]
jge 0x41157f
cmp edi, dword [eax + 0x10]
jge 0x4115c3
push eax
call fcn.0040f55c
jmp 0x4115c2
push dword [esi]
call fcn.0040f59a
pop ecx
mov eax, dword [esi]
cmp dword [eax + 0x10], edi
jl 0x4115bb
push dword [esi + 0x23c]
push eax
call fcn.004110f7
pop ecx
pop ecx
mov dword [esi + 4], edi
lea eax, [ebp - 0x71]
push eax
push dword [ebp + 0x5e4]
push ebx
push dword [esi]
call fcn.00411255
mov edi, eax
add esp, 0x10
test edi, edi
jg 0x411602
push dword [esi]
call fcn.0040f79a
or dword [esi + 4], 0xffffffff
pop ecx
cmp byte [ebp - 0x71], 0
je 0x41160f
xor eax, eax
jmp 0x4118bb
test edi, edi
jle 0x41161d
mov eax, 0x600
jmp 0x4118bb
xor eax, eax
cmp edi, 0xffffff96
setne al
dec eax
and eax, 0xfb001000
add eax, 0x5000000
jmp 0x4118bb
cmp dword [esi + 4], 0xffffffff
je 0x411643
push dword [esi]
call fcn.0040f79a
pop ecx
mov eax, dword [esi]
mov edi, dword [ebp + 0x5dc]
or dword [esi + 4], 0xffffffff
cmp edi, dword [eax + 4]
jge 0x41157f
cmp edi, dword [eax + 0x10]
jge 0x41166d
push eax
call fcn.0040f55c
jmp 0x41166c
push dword [esi]
call fcn.0040f59a
pop ecx
mov eax, dword [esi]
cmp dword [eax + 0x10], edi
jl 0x411665
lea eax, [ebp - 0x70]
push eax
push edi
mov ecx, esi
call fcn.0040f94d
test byte [ebp + 0x19c], 0x10
je 0x4116cb
cmp dword [ebp + 0x5e8], 1
je 0x411608
movzx eax, word [ebx]
cmp ax, 0x2f
je 0x4116b1
cmp ax, 0x5c
je 0x4116b1
test ax, ax
je 0x4116b6
cmp word [ebx + 2], 0x3a
jne 0x4116b6
push ebx
push 0
jmp 0x4116be
push ebx
add esi, 0x244
push esi
call fcn.0040fdb8
pop ecx
xor eax, eax
jmp 0x4118ba
cmp dword [ebp + 0x5e8], 1
jne 0x4116dc
mov dword [ebp - 0x7c], ebx
jmp 0x411772
movzx eax, word [ebx]
test ax, ax
mov edi, ebx
mov ecx, ebx
je 0x411704
movzx eax, ax
cmp ax, 0x2f
je 0x4116f7
cmp ax, 0x5c
jne 0x4116fa
lea edi, [ecx + 2]
inc ecx
inc ecx
movzx eax, word [ecx]
test ax, ax
jne 0x4116eb
lea eax, [ebp + 0x3c8]
push ebx
push eax
call fcn.0042df93
cmp edi, ebx
pop ecx
pop ecx
jne 0x411782
and word [ebp + 0x3c8], 0
push edi
lea eax, [ebp + 0x3c8]
push eax
lea ebx, [esi + 0x244]
push ebx
lea eax, [ebp + 0x1c0]
push 0x44e1f0
push eax
call dword [sym.imp.USER32.dll_wsprintfW]
lea eax, [ebp + 0x3c8]
push eax
push ebx
call fcn.0040fdb8
add esp, 0x1c
xor eax, eax
push eax
push dword [ebp + 0x19c]
push 2
push eax
push eax
push 0x40000000
lea eax, [ebp + 0x1c0]
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov dword [ebp - 0x7c], eax
cmp dword [ebp - 0x7c], 0xffffffff
jne 0x4117f1
mov eax, 0x200
jmp 0x4118bb
mov eax, edi
sub eax, ebx
sar eax, 1
and word [ebp + eax*2 + 0x3c8], 0
cmp word [ebp + 0x3c8], 0x2f
je 0x4117c1
cmp word [ebp + 0x3c8], 0x5c
je 0x4117c1
cmp word [ebp + 0x3c8], 0
je 0x41171f
cmp word [ebp + 0x3ca], 0x3a
jne 0x41171f
push edi
lea eax, [ebp + 0x3c8]
push eax
lea eax, [ebp + 0x1c0]
push 0x44e1e4
push eax
call dword [sym.imp.USER32.dll_wsprintfW]
lea eax, [ebp + 0x3c8]
push eax
push 0
call fcn.0040fdb8
add esp, 0x18
jmp 0x411750
push dword [esi + 0x23c]
push dword [esi]
call fcn.004110f7
cmp dword [esi + 0x240], 0
pop ecx
pop ecx
mov ebx, 0x4000
jne 0x41181b
push ebx
call fcn.0042cca0
pop ecx
mov dword [esi + 0x240], eax
and dword [ebp - 0x78], 0
lea eax, [ebp - 0x71]
push eax
push ebx
push dword [esi + 0x240]
push dword [esi]
call fcn.00411255
mov edi, eax
add esp, 0x10
cmp edi, 0xffffff96
je 0x41186e
test edi, edi
jl 0x411865
jle 0x41185b
push 0
lea eax, [ebp - 0x80]
push eax
push edi
push dword [esi + 0x240]
push dword [ebp - 0x7c]
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x411877
cmp byte [ebp - 0x71], 0
jne 0x411880
test edi, edi
jne 0x41181f
mov dword [ebp - 0x78], 0x5000000
jmp 0x41189e
mov dword [ebp - 0x78], 0x1000
jmp 0x41189e
mov dword [ebp - 0x78], 0x400
jmp 0x41189e
lea eax, [ebp + 0x1b0]
push eax
lea eax, [ebp + 0x1a0]
push eax
lea eax, [ebp + 0x1a8]
push eax
push dword [ebp - 0x7c]
call dword [sym.imp.KERNEL32.dll_SetFileTime]
cmp dword [ebp + 0x5e8], 1
je 0x4118b0
push dword [ebp - 0x7c]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push dword [esi]
call fcn.0040f79a
mov eax, dword [ebp - 0x78]
pop ecx
mov ecx, dword [ebp + 0x5d0]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.0042c3ca
add ebp, 0x5d4
leave
ret 0x10