Function at 0x415e16
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
mov eax, dword fs:[0]
push 0xffffffffffffffff
push 0x61fae2
push eax
mov dword fs:[0], esp
sub esp, 0x58
push ebx
mov ebx, dword [ebp + 8]
push esi
push edi
mov esi, ecx
cmp ebx, 0xffffffff
jne 0x415e57
xor eax, eax
mov ecx, dword [esp + 0x64]
pop edi
pop esi
mov dword fs:[0], ecx
pop ebx
mov esp, ebp
pop ebp
ret 4
mov eax, dword [esi + 0x24]
mov ecx, dword [eax]
xor edi, edi
cmp ecx, edi
je 0x415e7f
mov eax, dword [esi + 0x34]
mov edx, dword [eax]
add edx, ecx
cmp ecx, edx
jae 0x415e7f
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 0x415e43
mov eax, dword [esi + 0x4c]
cmp eax, edi
jne 0x415e8b
or eax, 0xffffffff
jmp 0x415e43
cmp dword [esi + 0x3c], edi
jne 0x415ea3
push eax
movsx eax, bl
push eax
call fcn.005b75e2
pop ecx
pop ecx
cmp eax, 0xffffffff
je 0x415e86
jmp 0x415e7b
push edi
lea ecx, [esp + 0x48]
mov byte [esp + 0x17], bl
mov dword [esp + 0x60], 0xf
call fcn.00403c2c
push 8
pop ebx
cmp dword [esp + 0x5c], ebx
jae 0x415ed0
push dword [esp + 0x58]
lea ecx, [esp + 0x48]
push ebx
call fcn.00403a67
push edi
push ebx
push edi
lea ecx, [esp + 0x50]
call fcn.00409288
push ebx
lea ecx, [esp + 0x48]
call fcn.00403c2c
mov dword [esp + 0x6c], edi
lea eax, [esp + 0x24]
push eax
lea ecx, [esp + 0x48]
call fcn.0040990a
mov ecx, eax
call fcn.0041722a
mov edi, dword [esp + 0x58]
mov ebx, eax
lea eax, [esp + 0x2c]
push eax
lea ecx, [esp + 0x48]
call fcn.0040990a
mov ecx, eax
call fcn.0041722a
lea edx, [esp + 0x18]
add ebx, edi
push edx
push ebx
lea ebx, [esi + 0x44]
jmp 0x415fe4
cmp eax, 1
jg 0x416025
lea eax, [esp + 0x34]
push eax
lea ecx, [esp + 0x48]
call fcn.0040990a
mov ecx, eax
call fcn.0041722a
mov edi, dword [esp + 0x18]
sub edi, eax
je 0x415f7c
lea eax, [esp + 0x3c]
push eax
lea ecx, [esp + 0x48]
call fcn.0040990a
mov ecx, eax
call fcn.0041722a
push dword [esi + 0x4c]
push edi
push 1
push eax
call fcn.005b7cae
add esp, 0x10
cmp edi, eax
jne 0x416009
lea eax, [esp + 0x13]
mov byte [esi + 0x41], 1
cmp dword [esp + 0x1c], eax
jne 0x416041
test edi, edi
ja 0x415fa6
cmp dword [esp + 0x58], 0x20
jae 0x416009
push 0
push 8
lea ecx, [esp + 0x4c]
call fcn.0040923a
lea eax, [esp + 0x24]
push eax
lea ecx, [esp + 0x48]
call fcn.0040990a
mov ecx, eax
call fcn.0041722a
mov edi, dword [esp + 0x58]
mov dword [esp + 0x20], eax
lea eax, [esp + 0x2c]
push eax
lea ecx, [esp + 0x48]
call fcn.0040990a
mov ecx, eax
call fcn.0041722a
lea edx, [esp + 0x18]
push edx
mov edx, dword [esp + 0x24]
add edx, edi
push edx
mov ecx, dword [esi + 0x3c]
push eax
lea edx, [esp + 0x28]
push edx
lea edx, [esp + 0x24]
push edx
lea edx, [esp + 0x27]
push edx
mov dword [esp + 0x2c], eax
mov eax, dword [ecx]
push ebx
call dword [eax + 0x14]
test eax, eax
jge 0x415f2a
or esi, 0xffffffff
or dword [esp + 0x6c], 0xffffffff
push 0
push 1
lea ecx, [esp + 0x4c]
call fcn.00403b67
mov eax, esi
jmp 0x415e43
cmp eax, 3
jne 0x416009
movsx eax, byte [esp + 0x13]
push dword [esi + 0x4c]
push eax
call fcn.005b75e2
or esi, 0xffffffff
pop ecx
pop ecx
cmp eax, esi
je 0x41600c
mov esi, dword [ebp + 8]
jmp 0x41600c