Function at 0x4516b0
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x14
mov dword [ebp - 0x14], ecx
call fcn.004573d0
test eax, eax
jne 0x451a26
cmp dword [0x537a0c], eax
jne 0x4516d8
mov dword [0x557674], eax
mov dword [0x557678], eax
mov eax, dword [0x5379e4]
push esi
xor esi, esi
mov dword [ebp - 4], eax
push edi
cmp dword [0x55767c], esi
jle 0x451705
mov edi, eax
mov edi, edi
xor edx, edx
mov ecx, edi
call fcn.00450f70
inc esi
add edi, 0x10
cmp esi, dword [0x55767c]
jl 0x4516f0
mov eax, dword [0x537a14]
xor esi, esi
mov dword [ebp - 8], eax
cmp dword [0x557680], esi
jle 0x451735
mov edi, eax
lea esp, [esp]
xor edx, edx
mov ecx, edi
call fcn.00450f70
inc esi
add edi, 0x10
cmp esi, dword [0x557680]
jl 0x451720
mov edi, dword [0x5379f0]
xor esi, esi
mov dword [ebp - 0xc], edi
cmp dword [0x557684], esi
jle 0x45176b
jmp 0x451750
xor edx, edx
mov ecx, edi
call fcn.00450f70
inc esi
add edi, 0x10
cmp esi, dword [0x557684]
jl 0x451750
mov edi, dword [0x5379f0]
xor esi, esi
cmp dword [0x55767c], esi
jle 0x4517a4
mov eax, dword [0x5379e4]
xor edi, edi
mov dword [ebp - 0x10], eax
nop
or edx, 0xffffffff
mov ecx, eax
call fcn.00450f70
add esi, eax
inc edi
mov eax, dword [ebp - 0x10]
add eax, 0x10
mov dword [ebp - 0x10], eax
cmp edi, dword [0x55767c]
jl 0x451780
mov edi, dword [0x5379f0]
cmp dword [0x557680], 0
jle 0x4517e4
mov eax, dword [0x537a14]
xor edi, edi
mov dword [ebp - 0x10], eax
jmp 0x4517c0
or edx, 0xffffffff
mov ecx, eax
call fcn.00450f70
add esi, eax
inc edi
mov eax, dword [ebp - 0x10]
add eax, 0x10
mov dword [ebp - 0x10], eax
cmp edi, dword [0x557680]
jl 0x4517c0
mov edi, dword [0x5379f0]
cmp dword [0x557684], 0
mov dword [ebp - 0x10], 0
jle 0x451812
or edx, 0xffffffff
mov ecx, edi
call fcn.00450f70
add esi, eax
add edi, 0x10
mov eax, dword [ebp - 0x10]
inc eax
mov dword [ebp - 0x10], eax
cmp eax, dword [0x557684]
jl 0x4517f4
lea eax, [esi + 0x20]
mov dword [0x557688], esi
push eax
call fcn.00497cab
mov edi, eax
add esp, 4
test edi, edi
jne 0x451858
push 0x10
push str.malloc
push 0x4c9a90
push eax
call dword [0x4b4414]
mov eax, dword [0x537a14]
mov ecx, dword [0x5379e4]
mov dword [ebp - 8], eax
mov eax, dword [0x5379f0]
mov dword [ebp - 4], ecx
mov dword [ebp - 0xc], eax
jmp 0x45185e
mov ecx, dword [0x5379e4]
xor esi, esi
mov dword [ebp - 0x10], esi
cmp dword [0x55767c], esi
jle 0x451896
jmp 0x451870
push esi
lea edx, [edi + esi]
call fcn.00451030
mov ecx, dword [ebp - 4]
add esi, eax
mov eax, dword [ebp - 0x10]
add ecx, 0x10
inc eax
mov dword [ebp - 4], ecx
add esp, 4
mov dword [ebp - 0x10], eax
cmp eax, dword [0x55767c]
jl 0x451870
cmp dword [0x557680], 0
mov dword [ebp - 0x10], 0
jle 0x4518d6
mov ecx, dword [0x537a14]
lea esp, [esp]
push esi
lea edx, [edi + esi]
call fcn.00451030
mov ecx, dword [ebp - 8]
add esi, eax
mov eax, dword [ebp - 0x10]
add ecx, 0x10
inc eax
mov dword [ebp - 8], ecx
add esp, 4
mov dword [ebp - 0x10], eax
cmp eax, dword [0x557680]
jl 0x4518b0
cmp dword [0x557684], 0
mov dword [ebp - 0x10], 0
jle 0x451916
mov ecx, dword [0x5379f0]
lea esp, [esp]
push esi
lea edx, [edi + esi]
call fcn.00451030
mov ecx, dword [ebp - 0xc]
add esi, eax
mov eax, dword [ebp - 0x10]
add ecx, 0x10
inc eax
mov dword [ebp - 0xc], ecx
add esp, 4
mov dword [ebp - 0x10], eax
cmp eax, dword [0x557684]
jl 0x4518f0
push 0
mov ecx, str.save_chs
call fcn.0045e940
push eax
call dword [0x4b41ec]
push 0x4c3dd8
push dword [ebp - 0x14]
call fcn.00494396
add esp, 8
mov dword [ebp - 4], eax
test eax, eax
je 0x451a05
push eax
push 1
push 0xa560
push 0x557460
call fcn.0049528d
mov ecx, dword [0x557674]
add esp, 0x10
test ecx, ecx
je 0x451982
mov eax, dword [0x557678]
push dword [ebp - 4]
imul eax, ecx
push 1
shl eax, 2
push eax
push dword [0x537a0c]
call fcn.0049528d
add esp, 0x10
mov eax, dword [0x557670]
push dword [ebp - 4]
inc eax
imul eax, eax, 0xa8
push 1
push eax
push 0x561de0
call fcn.0049528d
push dword [ebp - 4]
mov eax, dword [0x55767c]
push 1
shl eax, 4
push eax
push dword [0x5379e4]
call fcn.0049528d
push dword [ebp - 4]
mov eax, dword [0x557680]
push 1
shl eax, 4
push eax
push dword [0x537a14]
call fcn.0049528d
push dword [ebp - 4]
mov eax, dword [0x557684]
push 1
shl eax, 4
push eax
push dword [0x5379f0]
call fcn.0049528d
add esp, 0x40
push dword [ebp - 4]
push 1
push esi
push edi
call fcn.0049528d
push dword [ebp - 4]
call fcn.00494b54
add esp, 0x14
jmp 0x451a12
push 0x4c678c
call fcn.00485990
add esp, 4
test edi, edi
je 0x451a1f
push edi
call fcn.00494034
add esp, 4
call fcn.00451450
pop edi
pop esi
mov esp, ebp
pop ebp
ret