Function at 0x1017829b
Capabilities:
Write file on windows

Disassembly:
push 0xac
mov eax, 0x10195978
call fcn.1015d10b
mov esi, ecx
xor edi, edi
cmp dword [ebp + 8], edi
jne 0x101782c1
mov eax, dword [ebp + 0x20]
mov dword [eax], 0x80004003
jmp 0x1017851a
mov ebx, dword [ebp + 0xc]
mov eax, ebx
or eax, dword [ebp + 0x10]
jne 0x101782d9
mov eax, dword [ebp + 0x20]
mov dword [eax], 0x57
jmp 0x1017851a
cmp byte [esi + 0x20], 0
je 0x101782e9
cmp byte [esi + 0x21], 0
jne 0x1017840b
cmp byte [ebp + 0x34], 0
jne 0x1017840b
mov dword [ebp - 0x20], edi
mov dword [ebp - 0x1c], edi
mov dword [ebp - 0x18], edi
push edi
push ebx
lea ecx, [ebp - 0x24]
mov dword [ebp - 4], edi
call fcn.1000d270
cmp dword [ebp + 0x10], edi
jl 0x10178334
jg 0x10178314
cmp ebx, edi
jbe 0x10178334
push edi
lea ecx, [ebp - 0x24]
call fcn.10003510
mov ecx, dword [ebp + 8]
mov cl, byte [edi + ecx]
inc edi
mov byte [eax], cl
mov eax, edi
cdq
cmp edx, dword [ebp + 0x10]
jl 0x10178314
jg 0x10178334
cmp eax, ebx
jb 0x10178314
lea eax, [ebp - 0x24]
push eax
push dword [ebp + 0x18]
lea ecx, [ebp - 0x58]
push dword [ebp + 0x14]
push dword [ebp + 0x30]
push dword [ebp + 0x24]
push dword [ebp + 0x2c]
push dword [ebp + 0x28]
call fcn.10177d52
lea eax, [esi + 0x64]
push eax
lea ecx, [ebp - 0x14]
call fcn.100035d0
mov edi, dword [esi + 0x80]
and edi, reloc.WS2_32.dll_accept
mov byte [ebp - 4], 2
jns 0x10178375
dec edi
or edi, 0xfffffffe
inc edi
sub esp, 0x28
lea eax, [ebp - 0x58]
mov ecx, esp
mov dword [ebp + 0x34], esp
push eax
call fcn.10177c27
push dword [ebp + 0x18]
lea eax, [ebp - 0xb8]
push dword [ebp + 0x14]
push eax
call fcn.10177e46
add esp, 0x34
push eax
lea ecx, [ebp - 0x88]
mov byte [ebp - 4], 3
call fcn.10177d0c
lea eax, [ebp - 0x88]
push eax
lea eax, [ebp - 0x30]
push eax
push edi
lea ecx, [esi + 0x54]
mov byte [ebp - 4], 4
call fcn.10176f44
mov ecx, eax
call fcn.1017816a
lea ecx, [ebp - 0x68]
call fcn.1001db20
lea ecx, [ebp - 0x98]
call fcn.1001db20
lea ecx, [ebp - 0x14]
call fcn.100035f0
mov eax, dword [ebp + 0x20]
and dword [eax], 0
lea ecx, [ebp - 0x40]
call fcn.1001db20
lea ecx, [ebp - 0x24]
call fcn.1001db20
mov edx, dword [ebp + 0x10]
mov eax, ebx
add eax, 1
adc edx, 0
jmp 0x1017851e
call fcn.10176b99
test al, al
je 0x10178511
mov eax, dword [esi + 0x28]
cmp eax, dword [0x101c78c4]
je 0x10178511
lea eax, [esi + 0x84]
push eax
lea ecx, [ebp - 0x14]
call fcn.100035d0
mov eax, dword [ebp + 0x14]
cmp eax, dword [0x101c78e0]
mov ecx, dword [ebp + 0x18]
jne 0x1017844c
cmp ecx, dword [0x101c78e4]
je 0x10178483
push dword [ebp + 0x20]
push dword [ebp + 0x1c]
push ecx
push eax
mov ecx, esi
call fcn.10176e09
cmp eax, dword [0x101c78d8]
jne 0x10178483
cmp edx, dword [0x101c78dc]
jne 0x10178483
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov ecx, dword [ebp + 0x20]
mov dword [ecx], eax
lea ecx, [ebp - 0x14]
call fcn.100035f0
jmp 0x1017851a
push edi
lea eax, [ebp + 0x34]
push eax
push ebx
push dword [ebp + 8]
mov dword [ebp + 0x34], edi
push dword [esi + 0x24]
mov edi, dword [sym.imp.KERNEL32.dll_WriteFile]
call edi
test eax, eax
je 0x1017846b
mov edx, dword [ebp + 0x34]
xor eax, eax
cmp eax, dword [ebp + 0x10]
jg 0x10178504
jl 0x101784ae
cmp edx, ebx
jae 0x10178504
mov eax, dword [ebp + 8]
and dword [ebp + 0x30], 0
push 0
lea ecx, [ebp + 0x30]
push ecx
mov ecx, ebx
sub ecx, edx
push ecx
add eax, edx
push eax
push dword [esi + 0x24]
call edi
test eax, eax
je 0x1017846b
mov edx, dword [ebp + 0x34]
mov eax, dword [ebp + 0x10]
xor ecx, ecx
sub ebx, edx
sbb eax, ecx
cmp ecx, eax
jg 0x101784fe
jl 0x101784e3
cmp dword [ebp + 0x30], ebx
jae 0x101784fe
mov eax, dword [ebp + 0x20]
xor esi, esi
mov dword [eax], 0x1d
xor edi, edi
lea ecx, [ebp - 0x14]
call fcn.100035f0
mov eax, esi
mov edx, edi
jmp 0x1017851e
add edx, dword [ebp + 0x30]
mov dword [ebp + 0x34], edx
mov ecx, dword [ebp + 0x20]
xor eax, eax
mov dword [ecx], eax
mov esi, edx
mov edi, eax
jmp 0x101784f0
mov eax, dword [ebp + 0x20]
mov dword [eax], 5
xor eax, eax
xor edx, edx
call fcn.1015d1e3
ret 0x30