Function at 0x41360a
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
push 0xffffffffffffffff
push 0x4854c2
mov eax, dword fs:[0]
push eax
sub esp, 0x58
mov eax, dword [0x4aeda0]
xor eax, esp
mov dword [esp + 0x50], eax
push ebx
push esi
push edi
mov eax, dword [0x4aeda0]
xor eax, esp
push eax
lea eax, [esp + 0x68]
mov dword fs:[0], eax
mov edi, dword [ebp + 8]
mov eax, 0xffff
mov esi, ecx
cmp ax, di
jne 0x41365f
lea eax, [ebp + 8]
push eax
call fcn.0040c78a
pop ecx
jmp 0x4137fd
mov eax, dword [esi + 0x24]
mov ecx, dword [eax]
xor ebx, ebx
cmp ecx, ebx
je 0x41368d
mov eax, dword [esi + 0x34]
mov edx, dword [eax]
lea edx, [ecx + edx*2]
cmp ecx, edx
jae 0x41368d
dec dword [eax]
mov esi, dword [esi + 0x24]
mov eax, dword [esi]
lea ecx, [eax + 2]
mov dword [esi], ecx
mov word [eax], di
mov ax, di
jmp 0x4137fd
mov eax, dword [esi + 0x4c]
cmp eax, ebx
je 0x4137f8
cmp dword [esi + 0x3c], ebx
jne 0x4136b6
push eax
push edi
call fcn.0040f005
pop ecx
test al, al
pop ecx
movzx eax, di
jne 0x4137fd
jmp 0x4137f8
movzx eax, di
push ebx
push 8
lea ecx, [esp + 0x4c]
mov dword [esp + 0x18], eax
call fcn.00408e71
lea eax, [esp + 0x24]
push eax
lea ecx, [esp + 0x48]
mov dword [esp + 0x74], ebx
call fcn.00408f31
mov ecx, eax
call fcn.0040a0f4
mov edi, dword [esp + 0x58]
mov ebx, eax
lea eax, [esp + 0x2c]
push eax
lea ecx, [esp + 0x48]
call fcn.00408f31
mov ecx, eax
call fcn.0040a0f4
lea edx, [esp + 0x18]
add edi, ebx
push edx
lea ebx, [esi + 0x44]
jmp 0x4137c5
cmp eax, 1
jg 0x41381d
lea eax, [esp + 0x34]
push eax
lea ecx, [esp + 0x48]
call fcn.00408f31
mov ecx, eax
call fcn.0040a0f4
mov edi, dword [esp + 0x18]
sub edi, eax
je 0x41375e
lea eax, [esp + 0x3c]
push eax
lea ecx, [esp + 0x48]
call fcn.00408f31
mov ecx, eax
call fcn.0040a0f4
push dword [esi + 0x4c]
push edi
push 1
push eax
call fcn.004532c9
add esp, 0x10
cmp edi, eax
jne 0x4137eb
lea eax, [esp + 0x10]
mov byte [esi + 0x42], 1
cmp dword [esp + 0x1c], eax
jne 0x41384f
test edi, edi
ja 0x413788
cmp dword [esp + 0x58], 0x20
push 0
lea ecx, [esp + 0x48]
jae 0x4137f1
push 8
call fcn.00401832
lea eax, [esp + 0x24]
push eax
lea ecx, [esp + 0x48]
call fcn.00408f31
mov ecx, eax
call fcn.0040a0f4
mov edi, dword [esp + 0x58]
mov dword [esp + 0x20], eax
lea eax, [esp + 0x2c]
push eax
lea ecx, [esp + 0x48]
call fcn.00408f31
mov ecx, eax
call fcn.0040a0f4
lea edx, [esp + 0x18]
push edx
mov edx, dword [esp + 0x24]
add edi, edx
mov ecx, dword [esi + 0x3c]
push edi
push eax
lea edx, [esp + 0x28]
push edx
lea edx, [esp + 0x22]
push edx
lea edx, [esp + 0x24]
push edx
mov dword [esp + 0x2c], eax
mov eax, dword [ecx]
push ebx
call dword [eax + 0x14]
test eax, eax
jge 0x41370c
push 0
lea ecx, [esp + 0x48]
push 1
call fcn.0040230d
mov eax, 0xffff
mov ecx, dword [esp + 0x68]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x50]
xor ecx, esp
call fcn.004504a7
mov esp, ebp
pop ebp
ret 4
cmp eax, 3
jne 0x4137eb
push dword [esi + 0x4c]
push dword [esp + 0x14]
call fcn.0040f005
movzx esi, word [ebp + 8]
pop ecx
pop ecx
test al, al
jne 0x41383d
mov esi, 0xffff
push 0
push 1
lea ecx, [esp + 0x4c]
call fcn.0040230d
mov ax, si
jmp 0x4137fd
push 0
push 1
lea ecx, [esp + 0x4c]
call fcn.0040230d
mov ax, word [ebp + 8]
jmp 0x4137fd