Function at 0x100676b0
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x498
mov eax, dword [0x10415990]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
push esi
mov esi, ecx
push str.output
push 0x10445424
mov eax, 0x10458008
mov dword [ebp - 0x498], esi
call fcn.10079460
xor ebx, ebx
add esp, 8
cmp eax, ebx
je 0x10067702
push eax
call dword [sym.imp.MSVCR100.dll_atoi]
add esp, 4
mov dword [ebp - 0x494], 1
test al, 1
jne 0x10067708
mov dword [ebp - 0x494], ebx
cmp esi, ebx
je 0x100679a8
push edi
lea eax, [esi + 8]
push eax
push str._s.logcache
lea ecx, [ebp - 0x84]
push 0x80
push ecx
mov dword [ebp - 0x48c], ebx
mov word [ebp - 0x488], 0xa0d
call fcn.1005f880
add esp, 0x10
cmp dword [ebp - 0x494], ebx
je 0x10067790
lea edx, [ebp - 0x84]
test edx, edx
je 0x10067780
xor eax, eax
cmp eax, 0x10445438
je 0x10067780
mov ecx, edx
push ebx
push ecx
lea edi, [ebp - 0x484]
call fcn.1005fc80
mov edx, edi
push 0x10445438
push edx
call dword [sym.imp.MSVCR100.dll_fopen]
add esp, 0x10
mov dword [ebp - 0x48c], eax
jmp 0x10067790
mov dword [ebp - 0x48c], ebx
jmp 0x10067790
lea ecx, [esi + 0x4c]
cmp ecx, ebx
je 0x1006797f
mov edx, dword [ecx + 8]
cmp edx, ebx
jbe 0x1006797f
mov edi, dword [ecx]
mov eax, dword [edi]
mov dword [ebp - 0x490], edi
mov dword [ecx], eax
cmp eax, ebx
jne 0x100677b9
mov dword [ecx + 4], ebx
dec edx
mov dword [ecx + 8], edx
cmp dword [edi + 0x88], ebx
je 0x100678b3
cmp dword [edi + 0x8c], ebx
jbe 0x100678b3
cmp dword [ebp - 0x494], ebx
je 0x10067954
lea ebx, [edi + 8]
test ebx, ebx
je 0x10067954
xor eax, eax
cmp eax, 0x1044543c
je 0x10067954
push eax
push ebx
lea edi, [ebp - 0x284]
call fcn.1005fc80
mov ecx, edi
push 0x1044543c
push ecx
call dword [sym.imp.MSVCR100.dll_fopen]
mov esi, eax
add esp, 0x10
test esi, esi
je 0x1006794e
mov eax, dword [ebp - 0x490]
mov ecx, dword [eax + 0x8c]
mov eax, dword [eax + 0x88]
test eax, eax
je 0x1006784d
test ecx, ecx
je 0x1006784d
mov edi, dword [sym.imp.MSVCR100.dll_fwrite]
push esi
push ecx
push 1
push eax
call edi
add esp, 0x10
jmp 0x10067853
mov edi, dword [sym.imp.MSVCR100.dll_fwrite]
push esi
call dword [sym.imp.MSVCR100.dll_fclose]
mov eax, ebx
add esp, 4
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x10067862
sub eax, edx
cmp dword [ebp - 0x48c], 0
je 0x1006794e
test ebx, ebx
je 0x10067890
test eax, eax
je 0x10067890
mov edx, dword [ebp - 0x48c]
push edx
push eax
push 1
push ebx
call edi
add esp, 0x10
lea eax, [ebp - 0x488]
test eax, eax
je 0x1006794e
mov ecx, dword [ebp - 0x48c]
push ecx
push 2
mov edx, eax
push 1
push edx
call edi
jmp 0x1006794b
lea esi, [edi + 8]
cmp esi, ebx
je 0x10067954
xor eax, eax
cmp eax, 0x10445440
je 0x10067954
push ebx
push esi
lea edi, [ebp - 0x284]
call fcn.1005fc80
mov ecx, edi
push 0x10445440
push ecx
call dword [sym.imp.MSVCR100.dll_fopen]
add esp, 0x10
cmp eax, ebx
je 0x1006794e
push eax
call dword [sym.imp.MSVCR100.dll_fclose]
mov eax, esi
add esp, 4
lea edx, [eax + 1]
lea esp, [esp]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x10067900
sub eax, edx
cmp dword [ebp - 0x48c], ebx
je 0x1006794e
cmp esi, ebx
je 0x1006792d
cmp eax, ebx
je 0x1006792d
mov edx, dword [ebp - 0x48c]
push edx
push eax
push 1
push esi
call dword [sym.imp.MSVCR100.dll_fwrite]
add esp, 0x10
lea eax, [ebp - 0x488]
test eax, eax
je 0x1006794e
mov ecx, dword [ebp - 0x48c]
push ecx
push 2
mov edx, eax
push 1
push edx
call dword [sym.imp.MSVCR100.dll_fwrite]
add esp, 0x10
mov edi, dword [ebp - 0x490]
mov eax, dword [edi + 0x88]
xor ebx, ebx
cmp eax, ebx
je 0x1006796a
push eax
call dword [sym.imp.MSVCR100.dll_free]
add esp, 4
push edi
call dword [sym.imp.MSVCR100.dll_free]
mov esi, dword [ebp - 0x498]
add esp, 4
jmp 0x10067790
mov eax, dword [ebp - 0x48c]
pop edi
cmp eax, ebx
je 0x10067994
push eax
call dword [sym.imp.MSVCR100.dll_fclose]
add esp, 4
mov eax, dword [esi + 0x58]
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push esi
call dword [sym.imp.MSVCR100.dll_free]
add esp, 4
mov ecx, dword [ebp - 4]
pop esi
xor ecx, ebp
pop ebx
call fcn.1015eea7
mov esp, ebp
pop ebp
ret