Function at 0x41104f
Capabilities:
Write file on windows

Disassembly:
sub esp, 0x44c
push ebx
push ebp
push esi
push edi
mov edi, dword [esp + 0x460]
test edi, edi
je 0x4112d9
mov ebp, dword [esp + 0x464]
test ebp, ebp
je 0x4112d9
xor ebx, ebx
mov dword [esp + 0x1c], ebx
cmp dword [esp + 0x46c], ebx
ja 0x4112d9
jb 0x41109d
cmp dword [esp + 0x468], 0x400000
ja 0x4112d9
or dword [esp + 0x14], 0xffffffff
lea ecx, [esp + 0x38]
mov dword [esp + 0x10], 0x4679a8
call fcn.00403625
push 0x4baf44
push dword [0x4b9e88]
mov eax, ecx
mov dword [esp + 0x3c], 0x50000
push dword [0x4b9c70]
push 0x472d00
push eax
call fcn.004011fb
add esp, 0x10
lea ecx, [esp + 0x14]
push 3
push 3
push 0xc0000000
push dword [esp + 0x4c]
call fcn.00401442
mov esi, dword [esp + 0x14]
test al, al
je 0x4112ac
cmp esi, 0xffffffff
je 0x41112a
push 2
lea eax, [esp + 0x18]
xorps xmm0, xmm0
push eax
push ebx
push esi
movlpd qword [esp + 0x20], xmm0
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
mov dword [esp + 0x10], eax
cmp eax, 0xffffffff
jne 0x41112a
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [esp + 0x10], ebx
mov ebx, dword [sym.imp.KERNEL32.dll_WriteFile]
cmp esi, 0xffffffff
je 0x41114b
xor eax, eax
push eax
lea eax, [esp + 0x14]
push eax
push 4
lea eax, [esp + 0x40]
push eax
push esi
call ebx
mov ecx, edi
lea edx, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
cmp ax, word [esp + 0x1c]
jne 0x411150
sub ecx, edx
sar ecx, 1
lea eax, [ecx + 1]
mov dword [esp + 0x20], eax
xor eax, eax
mov dword [esp + 0x10], eax
cmp esi, 0xffffffff
je 0x411183
push eax
lea eax, [esp + 0x14]
push eax
push 4
lea eax, [esp + 0x2c]
push eax
push esi
call ebx
push edi
lea eax, [esp + 0x254]
push 0x104
push eax
call fcn.0042305c
mov eax, dword [esp + 0x2c]
lea ecx, [esp + 0x25c]
add esp, 0xc
lea edx, [eax + eax]
push 0x4698c0
call fcn.0044c57d
mov eax, dword [esp + 0x24]
pop ecx
xor ecx, ecx
add eax, eax
mov dword [esp + 0x10], ecx
cmp esi, 0xffffffff
je 0x4111d9
test eax, eax
je 0x4111d9
push ecx
lea ecx, [esp + 0x14]
push ecx
push eax
lea eax, [esp + 0x25c]
push eax
push esi
call ebx
push dword [esp + 0x46c]
mov ecx, ebp
push dword [esp + 0x46c]
call fcn.0044c3cc
xor edx, edx
mov dword [esp + 0x18], edx
pop ecx
pop ecx
cmp esi, 0xffffffff
je 0x411210
push edx
lea eax, [esp + 0x14]
push eax
push 4
lea eax, [esp + 0x474]
push eax
push esi
call ebx
xor edx, edx
mov eax, dword [esp + 0x46c]
xorps xmm0, xmm0
mov edi, dword [esp + 0x468]
mov dword [esp + 0x10], eax
movlpd qword [esp + 0x28], xmm0
cmp esi, 0xffffffff
je 0x4112aa
cmp eax, edx
ja 0x411238
cmp edi, edx
jbe 0x4112a0
mov ecx, dword [esp + 0x2c]
mov dword [esp + 0x1c], ecx
mov ecx, dword [esp + 0x28]
mov dword [esp + 0x28], ecx
mov dword [esp + 0x24], edx
cmp eax, edx
jb 0x411261
ja 0x41125a
cmp edi, 0xfffffff
jbe 0x411261
mov eax, 0xfffffff
jmp 0x411263
mov eax, edi
push edx
lea edx, [esp + 0x28]
push edx
push eax
lea eax, [ecx + ebp]
push eax
push esi
call ebx
test eax, eax
je 0x4112a0
mov ecx, dword [esp + 0x28]
add ecx, dword [esp + 0x24]
mov eax, dword [esp + 0x10]
push 0
pop edx
adc dword [esp + 0x1c], edx
sub edi, dword [esp + 0x24]
mov dword [esp + 0x28], ecx
sbb eax, edx
mov dword [esp + 0x10], eax
cmp eax, edx
ja 0x411248
jb 0x4112a0
cmp edi, edx
ja 0x411248
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
or esi, 0xffffffff
xor ebx, ebx
push dword [esp + 0x468]
push ebx
push ebp
call fcn.0041c9b0
add esp, 0xc
mov dword [esp + 0x38], 0x4654d8
mov dword [esp + 0x3c], ebx
mov dword [esp + 0x40], ebx
cmp esi, 0xffffffff
je 0x4112d9
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x44c
ret 0x10