Function at 0x1004c1a0
Capabilities:
Create thread
Print debug messages
Read file on windows
Write file on windows

Disassembly:
push ebx
mov ebx, esp
sub esp, 8
and esp, 0xfffffff8
add esp, 4
push ebp
mov ebp, dword [ebx + 4]
mov dword [esp + 4], ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x10092906
mov eax, dword fs:[0]
push eax
push ebx
sub esp, 0x8e0
mov eax, dword [0x100bb0a0]
xor eax, ebp
mov dword [ebp - 0x14], eax
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
push 0
push dword [0x100bb068]
mov dword [ebp - 4], 0
call dword [sym.imp.KERNEL32.dll_WaitNamedPipeA]
mov edi, dword [sym.imp.KERNEL32.dll_OutputDebugStringW]
test eax, eax
setne al
test al, al
jne 0x1004c356
call dword [sym.imp.KERNEL32.dll_GetCurrentProcessId]
mov esi, eax
mov eax, 0x10624dd3
mul esi
mov dword [ebp - 0x28], esi
shr edx, 6
imul ecx, edx, 0x3e8
push str.dwCurPid:__d__dwSleeptime:__d
sub esi, ecx
lea ecx, [ebp - 0x8f0]
mov dword [ebp - 0x2c], esi
call fcn.100118d0
lea ecx, [ebp - 0x28]
mov byte [ebp - 4], 1
mov dword [ebp - 0x20], ecx
lea ecx, [ebp - 0x20]
push ecx
push eax
mov dword [ebp - 0x1c], fcn.10020d00
mov dword [ebp - 0x18], 0x1002d630
call fcn.1000bd80
lea ecx, [ebp - 0x2c]
mov dword [ebp - 0x1c], fcn.10020d00
mov dword [ebp - 0x20], ecx
lea ecx, [ebp - 0x20]
push ecx
push eax
mov dword [ebp - 0x18], 0x1002d630
call fcn.1000bd80
push eax
lea eax, [ebp - 0x44]
push eax
call fcn.10010630
add esp, 0x18
lea ecx, [ebp - 0x8f0]
call fcn.10016540
cmp dword [ebp - 0x30], 0x10
lea eax, [ebp - 0x44]
cmovae eax, dword [ebp - 0x44]
push eax
call dword [sym.imp.KERNEL32.dll_OutputDebugStringA]
push 0x114
push 0
push 0x100c6be0
call fcn.100643b0
add esp, 0xc
mov dword [0x100c6be0], 0x114
push 0x100c6be0
call dword [sym.imp.KERNEL32.dll_GetVersionExW]
cmp byte [0x100c6e27], 0
jne 0x1004c301
push 0
push 0
push 0
push 0x1003aa00
push 0
push 0
call dword [sym.imp.KERNEL32.dll_CreateThread]
mov dword [0x100c6e20], eax
test eax, eax
jne 0x1004c2fa
push str.CreateThread_ThreadPipeServer_failed
call edi
mov byte [0x100c6e27], 1
push 0x3e8
call dword [sym.imp.KERNEL32.dll_Sleep]
mov eax, dword [ebp - 0x30]
cmp eax, 0x10
jb 0x1004c356
mov ecx, dword [ebp - 0x44]
inc eax
cmp eax, 0x1000
jb 0x1004c34d
test cl, 0x1f
je 0x1004c329
call fcn.1006fbaa
mov eax, dword [ecx - 4]
cmp eax, ecx
jb 0x1004c335
call fcn.1006fbaa
sub ecx, eax
cmp ecx, 4
jae 0x1004c341
call fcn.1006fbaa
cmp ecx, 0x23
jbe 0x1004c34b
call fcn.1006fbaa
mov ecx, eax
push ecx
call fcn.1004eb86
add esp, 4
push str.save_cur_url:_pipe
call edi
push 0
push 0x80
push 3
push 0
push 0
push 0xc0000000
push dword [0x100bb068]
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov esi, eax
cmp esi, 0xffffffff
jne 0x1004c38e
push str.CreateFileA_failed_n
call edi
jmp 0x1004c429
push 0x804
lea eax, [ebp - 0x84c]
push 0
push eax
call fcn.100643b0
cmp dword [ebx + 0x1c], 0x10
lea eax, [ebx + 8]
mov dword [ebp - 0x850], 3
cmovae eax, dword [ebx + 8]
push eax
lea eax, [ebp - 0x84c]
push 0x400
push eax
call fcn.1006e587
add esp, 0x18
mov dword [ebp - 0x28], 0
lea eax, [ebp - 0x28]
push 0
push eax
push 0x808
lea eax, [ebp - 0x850]
push eax
push esi
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
jne 0x1004c3f6
push str.write_pipe_failed_n
jmp 0x1004c420
push 0
lea eax, [ebp - 0x28]
mov dword [ebp - 0x28], 0
push eax
push 0x10
lea eax, [ebp - 0x24]
xorps xmm0, xmm0
push eax
push esi
movups xmmword [ebp - 0x24], xmm0
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
jne 0x1004c422
push str.read_pipe_failed_to_wait_check_end_n
call edi
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, dword [ebx + 0x1c]
cmp eax, 0x10
jb 0x1004c43e
inc eax
lea ecx, [ebx + 8]
push eax
push dword [ebx + 8]
call fcn.100024a0
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
mov ecx, dword [ebp - 0x14]
xor ecx, ebp
call fcn.1004eb8b
mov esp, ebp
pop ebp
mov esp, ebx
pop ebx
ret