Function at 0x410f50
Capabilities:
Write file on windows

Disassembly:
push 0xffffffffffffffff
push 0x4c2448
mov eax, dword fs:[0]
push eax
sub esp, 0x2c
mov eax, dword [0x570f20]
xor eax, esp
mov dword [esp + 0x28], eax
push ebx
push ebp
push esi
push edi
mov eax, dword [0x570f20]
xor eax, esp
push eax
lea eax, [esp + 0x40]
mov dword fs:[0], eax
mov ebx, dword [esp + 0x50]
mov esi, ecx
cmp ebx, 0xffffffff
jne 0x410f94
xor eax, eax
jmp 0x41115a
mov eax, dword [esi + 0x24]
mov ecx, dword [eax]
test ecx, ecx
je 0x410fbd
mov eax, dword [esi + 0x34]
mov edx, dword [eax]
add edx, ecx
cmp ecx, edx
jae 0x410fbd
dec dword [eax]
mov esi, dword [esi + 0x24]
mov eax, dword [esi]
lea ecx, [eax + 1]
mov dword [esi], ecx
mov byte [eax], bl
mov eax, ebx
jmp 0x41115a
cmp dword [esi + 0x54], 0
je 0x411157
mov ecx, dword [esi + 0x10]
lea edx, [esi + 0x48]
cmp dword [ecx], edx
jne 0x410fe5
mov edx, dword [esi + 0x3c]
mov eax, dword [esi + 0x40]
mov dword [ecx], edx
mov ecx, dword [esi + 0x20]
mov dword [ecx], eax
mov edx, dword [esi + 0x30]
sub eax, eax
mov dword [edx], eax
cmp dword [esi + 0x44], 0
jne 0x41100b
mov esi, dword [esi + 0x54]
movsx eax, bl
push esi
push eax
call fcn.004a8d78
add esp, 8
cmp eax, 0xffffffff
je 0x411157
mov eax, ebx
jmp 0x41115a
mov eax, 0xf
mov byte [esp + 0x20], 0
pxor xmm0, xmm0
mov dword [esp + 0x34], eax
movq qword [esp + 0x20], xmm0
cmp eax, 0x10
mov eax, dword [esp + 0x20]
mov byte [esp + 0x14], bl
mov dword [esp + 0x30], 8
jae 0x41103c
lea eax, [esp + 0x20]
mov byte [eax + 8], 0
mov dword [esp + 0x48], 0
lea ebx, [esi + 0x4c]
mov eax, dword [esp + 0x20]
mov ebp, dword [esp + 0x34]
mov edx, eax
cmp ebp, 0x10
jae 0x411060
lea edx, [esp + 0x20]
mov eax, edx
add edx, dword [esp + 0x30]
mov ecx, dword [esi + 0x44]
mov edi, dword [ecx]
lea ebp, [esp + 0x18]
push ebp
push edx
push eax
lea edx, [esp + 0x28]
push edx
lea eax, [esp + 0x25]
push eax
mov eax, dword [edi + 0x14]
lea edx, [esp + 0x28]
push edx
push ebx
call eax
test eax, eax
js 0x41114e
cmp eax, 1
jg 0x411104
mov ebp, dword [esp + 0x34]
mov eax, dword [esp + 0x20]
mov ecx, eax
cmp ebp, 0x10
jae 0x4110a5
lea ecx, [esp + 0x20]
mov edi, dword [esp + 0x18]
sub edi, ecx
je 0x4110d6
cmp ebp, 0x10
jae 0x4110b6
lea eax, [esp + 0x20]
mov ecx, dword [esi + 0x54]
push ecx
push edi
push 1
push eax
call fcn.004a8063
add esp, 0x10
cmp edi, eax
jne 0x41114e
mov ebp, dword [esp + 0x34]
mov eax, dword [esp + 0x20]
lea edx, [esp + 0x14]
mov byte [esi + 0x49], 1
cmp dword [esp + 0x1c], edx
jne 0x41113f
test edi, edi
jne 0x411053
cmp dword [esp + 0x30], 0x20
lea ecx, [esp + 0x20]
jae 0x411152
push edi
push 8
call fcn.0040ede0
jmp 0x41104b
cmp eax, 3
jne 0x41114e
mov eax, dword [esi + 0x54]
mov ecx, dword [esp + 0x14]
push eax
push ecx
call fcn.0040e3e0
add esp, 8
test al, al
je 0x41112f
mov esi, dword [esp + 0x50]
lea ecx, [esp + 0x20]
call fcn.0040d1d0
mov eax, esi
jmp 0x41115a
lea ecx, [esp + 0x20]
or esi, 0xffffffff
call fcn.0040d1d0
mov eax, esi
jmp 0x41115a
lea ecx, [esp + 0x20]
call fcn.0040d1d0
mov eax, dword [esp + 0x50]
jmp 0x41115a
lea ecx, [esp + 0x20]
call fcn.0040d1d0
or eax, 0xffffffff
mov ecx, dword [esp + 0x40]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebp
pop ebx
mov ecx, dword [esp + 0x28]
xor ecx, esp
call fcn.004a7314
add esp, 0x38
ret 4