Function at 0x10017889
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xa4c
push ebx
push esi
mov esi, dword [ebp + 8]
mov eax, dword [esi + 0x14]
mov eax, dword [eax + 0x108]
xor ebx, ebx
push edi
cmp eax, ebx
je 0x10017c65
cmp dword [eax + 4], ebx
je 0x10017c65
test byte [eax + 0x18], 0x40
je 0x10017c65
mov eax, dword [esi + 0x14]
lea edx, [ebp - 4]
add eax, 0x6c
push edx
mov dword [ebp - 4], ebx
mov ecx, dword [eax]
push eax
call dword [ecx + 0x74]
cmp eax, ebx
jge 0x100178f6
add esi, 0xfffffff8
push esi
mov esi, eax
call fcn.10015b1b
mov esi, eax
mov eax, dword [ebp - 4]
cmp eax, ebx
je 0x100178ef
mov ecx, dword [eax]
push eax
call dword [ecx + 8]
mov eax, esi
jmp 0x10017c7e
mov eax, dword [ebp - 4]
lea edx, [ebp - 0xc]
push edx
push 5
mov dword [ebp - 0xc], ebx
mov ecx, dword [eax]
push eax
call dword [ecx + 0x70]
cmp eax, ebx
jge 0x10017924
add esi, 0xfffffff8
push esi
mov esi, eax
call fcn.10015b1b
push dword [ebp - 0xc]
mov esi, eax
call dword [sym.imp.OLEAUT32.dll_SysStringLen]
jmp 0x100178e2
xor eax, eax
mov edi, 0x206
push edi
mov word [ebp - 0x22c], ax
lea eax, [ebp - 0x22a]
push ebx
push eax
call fcn.10131950
push dword [ebp - 0xc]
lea eax, [ebp - 0x22c]
push 0x1018b7e8
push eax
call fcn.10131892
lea eax, [ebp - 0x22c]
push 0x1018ede8
push eax
call fcn.10131845
mov eax, dword [ebp - 4]
mov ecx, dword [eax]
add esp, 0x20
lea edx, [ebp - 0x22c]
push edx
push eax
call dword [ecx + 0x134]
cmp eax, ebx
jl 0x1001790c
mov eax, dword [esi]
lea ecx, [ebp - 0x1c]
push ecx
push esi
mov dword [ebp - 0x1c], ebx
call dword [eax + 0x11c]
cmp eax, ebx
mov dword [ebp - 0x18], eax
jl 0x1001790c
xor eax, eax
push edi
mov word [ebp - 0x63c], ax
lea eax, [ebp - 0x63a]
push ebx
push eax
call fcn.10131950
lea eax, [ebp - 0x22c]
push eax
lea eax, [ebp - 0x63c]
push str._s_attr.ini
push eax
call fcn.10131892
xor eax, eax
push edi
mov word [ebp - 0xa4c], ax
lea eax, [ebp - 0xa4a]
push ebx
push eax
call fcn.10131950
xor eax, eax
push edi
mov word [ebp - 0x844], ax
lea eax, [ebp - 0x842]
push ebx
push eax
call fcn.10131950
push dword [ebp - 0x1c]
lea eax, [ebp - 0x844]
push 0x1018ee14
push eax
call fcn.10131892
add esp, 0x3c
lea eax, [ebp - 0x63c]
push eax
lea eax, [ebp - 0x844]
push eax
push str.count
push str.Count
call dword [sym.imp.KERNEL32.dll_WritePrivateProfileStringW]
mov dword [ebp - 0x10], ebx
cmp dword [ebp - 0x1c], ebx
jbe 0x10017c4a
mov eax, dword [esi]
lea ecx, [ebp - 8]
push ecx
push dword [ebp - 0x10]
mov dword [ebp - 8], ebx
push esi
call dword [eax + 0x120]
cmp eax, ebx
mov dword [ebp - 0x18], eax
jl 0x10017be0
mov eax, dword [esi]
lea ecx, [ebp - 0x14]
push ecx
push ebx
push dword [ebp - 8]
mov dword [ebp - 0x14], ebx
push esi
call dword [eax + 0x8c]
push dword [ebp - 0x14]
call fcn.101317de
pop ecx
mov ecx, dword [esi]
lea edx, [ebp - 0x14]
push edx
push eax
push dword [ebp - 8]
mov dword [ebp - 0x24], eax
push esi
call dword [ecx + 0x8c]
lea eax, [ebp + 0xb]
push eax
push dword [ebp - 8]
mov byte [ebp + 0xb], bl
lea ebx, [esi - 8]
call fcn.100177bc
mov eax, dword [ebp - 0x10]
inc eax
push eax
mov dword [ebp - 0x10], eax
lea eax, [ebp - 0xa4c]
push str.data_d
push eax
call fcn.10131892
mov ebx, dword [sym.imp.KERNEL32.dll_WritePrivateProfileStringW]
add esp, 0xc
lea eax, [ebp - 0x63c]
push eax
push dword [ebp - 8]
lea eax, [ebp - 0xa4c]
push 0x1018ee44
push eax
call ebx
movzx eax, byte [ebp + 0xb]
push eax
lea eax, [ebp - 0x844]
push 0x1018ee14
push eax
call fcn.10131892
add esp, 0xc
lea eax, [ebp - 0x63c]
push eax
lea eax, [ebp - 0x844]
push eax
push str.private
lea eax, [ebp - 0xa4c]
push eax
call ebx
xor eax, eax
push edi
push eax
mov word [ebp - 0x434], ax
lea eax, [ebp - 0x432]
push eax
call fcn.10131950
lea eax, [ebp - 0xa4c]
push eax
lea eax, [ebp - 0x22c]
push eax
mov ebx, str._s_s
lea eax, [ebp - 0x434]
push ebx
push eax
call fcn.10131892
mov eax, dword [ebp - 4]
mov ecx, dword [eax]
add esp, 0x1c
lea edx, [ebp - 0x434]
push edx
push eax
call dword [ecx + 0x134]
push dword [ebp - 8]
lea eax, [ebp - 0x434]
push eax
push ebx
push eax
call fcn.10131892
add esp, 0x10
xor ebx, ebx
push ebx
push 0x80
push 2
push ebx
push ebx
push 0x40000000
lea eax, [ebp - 0x434]
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov dword [ebp + 8], eax
cmp eax, 0xffffffff
je 0x10017c0e
mov eax, dword [ebp - 0x14]
mov dword [ebp - 0x20], ebx
push 0
lea ecx, [ebp - 0x20]
push ecx
sub eax, ebx
push eax
mov eax, dword [ebp - 0x24]
add eax, ebx
push eax
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_WriteFile]
add ebx, dword [ebp - 0x20]
test eax, eax
je 0x10017c1a
mov eax, dword [ebp - 0x14]
cmp ebx, eax
jb 0x10017b95
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push dword [ebp - 8]
call dword [sym.imp.OLEAUT32.dll_SysStringLen]
mov eax, dword [ebp - 0x10]
xor ebx, ebx
mov dword [ebp - 0x10], eax
cmp eax, dword [ebp - 0x1c]
jb 0x10017a38
jmp 0x10017c4a
add esi, 0xfffffff8
push esi
mov esi, eax
call fcn.10015b1b
push dword [ebp - 8]
mov esi, dword [sym.imp.OLEAUT32.dll_SysStringLen]
mov edi, eax
call esi
push dword [ebp - 0xc]
call esi
mov eax, dword [ebp - 4]
cmp eax, ebx
je 0x10017c0a
mov ecx, dword [eax]
push eax
call dword [ecx + 8]
mov eax, edi
jmp 0x10017c7e
push 0xe00b100f
mov eax, 0x1018a974
jmp 0x10017c2d
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push 0xe00b1012
mov eax, 0x1018a940
push 0x1018af0c
push 0x1018af9c
call fcn.10004ead
push dword [ebp - 8]
mov dword [ebp - 0x18], eax
call dword [sym.imp.OLEAUT32.dll_SysStringLen]
xor ebx, ebx
push dword [ebp - 0xc]
call dword [sym.imp.OLEAUT32.dll_SysStringLen]
mov eax, dword [ebp - 4]
cmp eax, ebx
je 0x10017c60
mov ecx, dword [eax]
push eax
call dword [ecx + 8]
mov eax, dword [ebp - 0x18]
jmp 0x10017c7e
push 0xe00b101b
push 0x1018af5c
push 0x1018af9c
mov eax, 0x1018a898
call fcn.10004ead
pop edi
pop esi
pop ebx
leave
ret 4