Function at 0x1004c270
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 0x10092986
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 0x1004c426
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.10011bb0
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.1002a7d0
mov dword [ebp - 0x18], 0x1002d7e0
call fcn.1000c060
lea ecx, [ebp - 0x2c]
mov dword [ebp - 0x1c], fcn.1002a7d0
mov dword [ebp - 0x20], ecx
lea ecx, [ebp - 0x20]
push ecx
push eax
mov dword [ebp - 0x18], 0x1002d7e0
call fcn.1000c060
push eax
lea eax, [ebp - 0x44]
push eax
call fcn.10010910
add esp, 0x18
lea ecx, [ebp - 0x8f0]
call fcn.10016790
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.10064410
add esp, 0xc
mov dword [0x100c6be0], 0x114
push 0x100c6be0
call dword [sym.imp.KERNEL32.dll_GetVersionExW]
cmp byte [0x100c6e27], 0
jne 0x1004c3d1
push 0
push 0
push 0
push 0x1003aab0
push 0
push 0
call dword [sym.imp.KERNEL32.dll_CreateThread]
mov dword [0x100c6e20], eax
test eax, eax
jne 0x1004c3ca
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 0x1004c426
mov ecx, dword [ebp - 0x44]
inc eax
cmp eax, 0x1000
jb 0x1004c41d
test cl, 0x1f
je 0x1004c3f9
call fcn.1006fbb9
mov eax, dword [ecx - 4]
cmp eax, ecx
jb 0x1004c405
call fcn.1006fbb9
sub ecx, eax
cmp ecx, 4
jae 0x1004c411
call fcn.1006fbb9
cmp ecx, 0x23
jbe 0x1004c41b
call fcn.1006fbb9
mov ecx, eax
push ecx
call fcn.1004ebb6
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 0x1004c45e
push str.CreateFileA_failed_n
call edi
jmp 0x1004c4f9
push 0x804
lea eax, [ebp - 0x84c]
push 0
push eax
call fcn.10064410
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.1006e5c7
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 0x1004c4c6
push str.write_pipe_failed_n
jmp 0x1004c4f0
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 0x1004c4f2
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 0x1004c50e
inc eax
lea ecx, [ebx + 8]
push eax
push dword [ebx + 8]
call fcn.10002440
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.1004ebbb
mov esp, ebp
pop ebp
mov esp, ebx
pop ebx
ret