Function at 0x411e70
Capabilities:
Write file on windows

Disassembly:
sub esp, 0x444
push ebx
push ebp
push esi
push edi
mov edi, dword [esp + 0x458]
test edi, edi
je 0x4120d1
mov ebx, dword [esp + 0x45c]
test ebx, ebx
je 0x4120d1
xor ebp, ebp
mov dword [esp + 0x20], ebp
cmp dword [esp + 0x464], ebp
ja 0x4120d1
jb 0x411ebe
cmp dword [esp + 0x460], 0x400000
ja 0x4120d1
lea ecx, [esp + 0x30]
call fcn.00403195
push 0x4b4e0c
push dword [0x4b3f68]
mov eax, ecx
mov dword [esp + 0x34], 0x50000
push dword [0x4b3d50]
push 0x46d3e8
push eax
call fcn.004011fb
add esp, 0x14
or esi, 0xffffffff
cmp dword [esp + 0x34], ebp
je 0x4120a4
push ebp
push 0x80
push 3
push ebp
push 3
push 0xc0000000
push dword [esp + 0x4c]
call dword [sym.imp.KERNEL32.DLL_CreateFileW]
mov esi, eax
cmp esi, 0xffffffff
je 0x4120a4
push 2
lea eax, [esp + 0x18]
xorps xmm0, xmm0
push eax
push ebp
push esi
movlpd qword [esp + 0x20], xmm0
call dword [sym.imp.KERNEL32.DLL_SetFilePointer]
mov dword [esp + 0x10], eax
cmp eax, 0xffffffff
jne 0x411f49
call dword [sym.imp.KERNEL32.DLL_GetLastError]
push ebp
lea eax, [esp + 0x14]
mov dword [esp + 0x14], ebp
mov ebp, dword [sym.imp.KERNEL32.DLL_WriteFile]
push eax
push 4
lea eax, [esp + 0x38]
push eax
push esi
call ebp
mov ecx, edi
lea edx, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
cmp ax, word [esp + 0x20]
jne 0x411f68
sub ecx, edx
sar ecx, 1
lea eax, [ecx + 1]
mov dword [esp + 0x18], eax
xor eax, eax
push eax
mov dword [esp + 0x14], eax
lea eax, [esp + 0x14]
push eax
push 4
lea eax, [esp + 0x24]
push eax
push esi
call ebp
push edi
lea eax, [esp + 0x24c]
push 0x104
push eax
call fcn.00422a5c
mov eax, dword [esp + 0x24]
lea ecx, [esp + 0x254]
add esp, 0xc
lea edx, [eax + eax]
push 0x464820
call fcn.00448e58
mov eax, dword [esp + 0x1c]
xor edi, edi
mov dword [esp + 0x14], edi
pop ecx
add eax, eax
je 0x411fe5
push edi
lea ecx, [esp + 0x14]
push ecx
push eax
lea eax, [esp + 0x254]
push eax
push esi
call ebp
push dword [esp + 0x464]
mov ecx, ebx
push dword [esp + 0x464]
call fcn.00448ca7
pop ecx
pop ecx
push edi
lea eax, [esp + 0x14]
mov dword [esp + 0x14], edi
push eax
push 4
lea eax, [esp + 0x46c]
push eax
push esi
call ebp
mov ebp, dword [esp + 0x464]
xor edx, edx
mov edi, dword [esp + 0x460]
xorps xmm0, xmm0
movlpd qword [esp + 0x20], xmm0
cmp ebp, edx
ja 0x412034
cmp edi, edx
jbe 0x412098
mov eax, dword [esp + 0x24]
mov ecx, dword [esp + 0x20]
mov dword [esp + 0x10], eax
mov dword [esp + 0x20], ecx
mov dword [esp + 0x1c], edx
cmp ebp, edx
jb 0x41205d
ja 0x412056
cmp edi, 0xfffffff
jbe 0x41205d
mov eax, 0xfffffff
jmp 0x41205f
mov eax, edi
push edx
lea edx, [esp + 0x20]
push edx
push eax
lea eax, [ecx + ebx]
push eax
push esi
call dword [sym.imp.KERNEL32.DLL_WriteFile]
test eax, eax
je 0x412098
mov ecx, dword [esp + 0x20]
add ecx, dword [esp + 0x1c]
push 0
pop edx
adc dword [esp + 0x10], edx
sub edi, dword [esp + 0x1c]
mov dword [esp + 0x20], ecx
sbb ebp, edx
cmp ebp, edx
ja 0x412044
jb 0x412098
cmp edi, edx
ja 0x412044
push esi
call dword [sym.imp.KERNEL32.DLL_CloseHandle]
or esi, 0xffffffff
xor ebp, ebp
push dword [esp + 0x460]
push ebp
push ebx
call fcn.0041c3f0
add esp, 0xc
mov dword [esp + 0x30], 0x460424
mov dword [esp + 0x34], ebp
mov dword [esp + 0x38], ebp
cmp esi, 0xffffffff
je 0x4120d1
push esi
call dword [sym.imp.KERNEL32.DLL_CloseHandle]
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x444
ret 0x10