Function at 0x1017a5f7
Capabilities:
Write file on windows

Disassembly:
push 0xac
mov eax, 0x10197c00
call fcn.1015e3cb
mov esi, ecx
xor edi, edi
cmp dword [ebp + 8], edi
jne 0x1017a61d
mov eax, dword [ebp + 0x20]
mov dword [eax], 0x80004003
jmp 0x1017a876
mov ebx, dword [ebp + 0xc]
mov eax, ebx
or eax, dword [ebp + 0x10]
jne 0x1017a635
mov eax, dword [ebp + 0x20]
mov dword [eax], 0x57
jmp 0x1017a876
cmp byte [esi + 0x20], 0
je 0x1017a645
cmp byte [esi + 0x21], 0
jne 0x1017a767
cmp byte [ebp + 0x34], 0
jne 0x1017a767
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.1000b100
cmp dword [ebp + 0x10], edi
jl 0x1017a690
jg 0x1017a670
cmp ebx, edi
jbe 0x1017a690
push edi
lea ecx, [ebp - 0x24]
call fcn.10001640
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 0x1017a670
jg 0x1017a690
cmp eax, ebx
jb 0x1017a670
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.1017a08d
lea eax, [esi + 0x64]
push eax
lea ecx, [ebp - 0x14]
call fcn.10001700
mov edi, dword [esi + 0x80]
and edi, reloc.WS2_32.dll_accept
mov byte [ebp - 4], 2
jns 0x1017a6d1
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.10179f62
push dword [ebp + 0x18]
lea eax, [ebp - 0xb8]
push dword [ebp + 0x14]
push eax
call fcn.1017a181
add esp, 0x34
push eax
lea ecx, [ebp - 0x88]
mov byte [ebp - 4], 3
call fcn.1017a047
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.1013824e
mov ecx, eax
call fcn.1017a4a5
lea ecx, [ebp - 0x68]
call fcn.10004a10
lea ecx, [ebp - 0x98]
call fcn.10004a10
lea ecx, [ebp - 0x14]
call fcn.10001720
mov eax, dword [ebp + 0x20]
and dword [eax], 0
lea ecx, [ebp - 0x40]
call fcn.10004a10
lea ecx, [ebp - 0x24]
call fcn.10004a10
mov edx, dword [ebp + 0x10]
mov eax, ebx
add eax, 1
adc edx, 0
jmp 0x1017a87a
call fcn.10178e63
test al, al
je 0x1017a86d
mov eax, dword [esi + 0x28]
cmp eax, dword [0x101cec4c]
je 0x1017a86d
lea eax, [esi + 0x84]
push eax
lea ecx, [ebp - 0x14]
call fcn.10001700
mov eax, dword [ebp + 0x14]
cmp eax, dword [0x101cec68]
mov ecx, dword [ebp + 0x18]
jne 0x1017a7a8
cmp ecx, dword [0x101cec6c]
je 0x1017a7df
push dword [ebp + 0x20]
push dword [ebp + 0x1c]
push ecx
push eax
mov ecx, esi
call fcn.10179108
cmp eax, dword [0x101cec60]
jne 0x1017a7df
cmp edx, dword [0x101cec64]
jne 0x1017a7df
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov ecx, dword [ebp + 0x20]
mov dword [ecx], eax
lea ecx, [ebp - 0x14]
call fcn.10001720
jmp 0x1017a876
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 0x1017a7c7
mov edx, dword [ebp + 0x34]
xor eax, eax
cmp eax, dword [ebp + 0x10]
jg 0x1017a860
jl 0x1017a80a
cmp edx, ebx
jae 0x1017a860
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 0x1017a7c7
mov edx, dword [ebp + 0x34]
mov eax, dword [ebp + 0x10]
xor ecx, ecx
sub ebx, edx
sbb eax, ecx
cmp ecx, eax
jg 0x1017a85a
jl 0x1017a83f
cmp dword [ebp + 0x30], ebx
jae 0x1017a85a
mov eax, dword [ebp + 0x20]
xor esi, esi
mov dword [eax], 0x1d
xor edi, edi
lea ecx, [ebp - 0x14]
call fcn.10001720
mov eax, esi
mov edx, edi
jmp 0x1017a87a
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 0x1017a84c
mov eax, dword [ebp + 0x20]
mov dword [eax], 5
xor eax, eax
xor edx, edx
call fcn.1015e4a3
ret 0x30