Function at 0x417656
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
mov eax, dword fs:[0]
push 0xffffffffffffffff
push 0x5de5ae
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 0x417697
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 0x4176bf
mov eax, dword [esi + 0x34]
mov edx, dword [eax]
add edx, ecx
cmp ecx, edx
jae 0x4176bf
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 0x417683
mov eax, dword [esi + 0x4c]
cmp eax, edi
jne 0x4176cb
or eax, 0xffffffff
jmp 0x417683
cmp dword [esi + 0x3c], edi
jne 0x4176e3
push eax
movsx eax, bl
push eax
call fcn.0057892c
pop ecx
pop ecx
cmp eax, 0xffffffff
je 0x4176c6
jmp 0x4176bb
push edi
lea ecx, [esp + 0x48]
mov byte [esp + 0x17], bl
mov dword [esp + 0x60], 0xf
call fcn.004035c1
push 8
pop ebx
cmp dword [esp + 0x5c], ebx
jae 0x417710
push dword [esp + 0x58]
lea ecx, [esp + 0x48]
push ebx
call fcn.004033fc
push edi
push ebx
push edi
lea ecx, [esp + 0x50]
call fcn.00408fa8
push ebx
lea ecx, [esp + 0x48]
call fcn.004035c1
mov dword [esp + 0x6c], edi
lea eax, [esp + 0x24]
push eax
lea eax, [esp + 0x48]
call fcn.00409660
mov ecx, eax
call fcn.004184d4
mov edi, dword [esp + 0x58]
mov ebx, eax
lea eax, [esp + 0x2c]
push eax
lea eax, [esp + 0x48]
call fcn.00409660
mov ecx, eax
call fcn.004184d4
lea edx, [esp + 0x18]
add ebx, edi
push edx
push ebx
lea ebx, [esi + 0x44]
jmp 0x417824
cmp eax, 1
jg 0x417865
lea eax, [esp + 0x34]
push eax
lea eax, [esp + 0x48]
call fcn.00409660
mov ecx, eax
call fcn.004184d4
mov edi, dword [esp + 0x18]
sub edi, eax
je 0x4177bc
lea eax, [esp + 0x3c]
push eax
lea eax, [esp + 0x48]
call fcn.00409660
mov ecx, eax
call fcn.004184d4
push dword [esi + 0x4c]
push edi
push 1
push eax
call fcn.00578d2f
add esp, 0x10
cmp edi, eax
jne 0x417849
lea eax, [esp + 0x13]
mov byte [esi + 0x41], 1
cmp dword [esp + 0x1c], eax
jne 0x417881
test edi, edi
ja 0x4177e6
cmp dword [esp + 0x58], 0x20
jae 0x417849
push 0
push 8
lea ecx, [esp + 0x4c]
call fcn.00408f5a
lea eax, [esp + 0x24]
push eax
lea eax, [esp + 0x48]
call fcn.00409660
mov ecx, eax
call fcn.004184d4
mov edi, dword [esp + 0x58]
mov dword [esp + 0x20], eax
lea eax, [esp + 0x2c]
push eax
lea eax, [esp + 0x48]
call fcn.00409660
mov ecx, eax
call fcn.004184d4
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 0x41776a
or esi, 0xffffffff
or dword [esp + 0x6c], 0xffffffff
push 0
push 1
lea ecx, [esp + 0x4c]
call fcn.004034fc
mov eax, esi
jmp 0x417683
cmp eax, 3
jne 0x417849
movsx eax, byte [esp + 0x13]
push dword [esi + 0x4c]
push eax
call fcn.0057892c
or esi, 0xffffffff
pop ecx
pop ecx
cmp eax, esi
je 0x41784c
mov esi, dword [ebp + 8]
jmp 0x41784c