Function at 0x4d7cc0
Capabilities:
Write file on windows

Disassembly:
push ebp
push edi
push esi
push ebx
mov esi, eax
mov ebx, edx
sub esp, 0x2c
mov eax, dword [edx + 0x2c]
test ah, 1
je 0x4d7c10
test eax, 0x20000
jne 0x4d7bc0
cmp dword [ebx + 0x94], 0xffffffff
je 0x4d7be9
mov edx, dword [ebx + 0x2c]
lea edi, [ebx + 0x44]
test edx, 0x1000000
je 0x4d7aa0
mov dword [esp + 8], 0x10
mov dword [esp + 4], edi
mov dword [esp], 0x4d7670
call dword [sym.imp.KERNEL32.DLL_QueueUserWorkItem]
sub esp, 0xc
test eax, eax
je 0x4d7b72
mov eax, ebx
call fcn.004d79a0
or dword [ebx + 0x2c], 0x20000
add dword [ebx + 0x3c], 1
add esp, 0x2c
pop ebx
pop esi
pop edi
pop ebp
ret
lea eax, [ebx + 0x64]
and edx, 0x100000
mov dword [ebx + 0x64], 0
mov dword [eax + 4], 0
mov dword [eax + 8], 0
mov dword [eax + 0xc], 0
mov dword [eax + 0x10], 0
je 0x4d7ada
mov edx, dword [ebx + 0x80]
or edx, 1
mov dword [ebx + 0x74], edx
mov dword [esp + 0x10], eax
mov eax, dword [ebx + 0x94]
mov dword [esp + 0xc], 0
mov dword [esp + 8], 0
mov dword [esp + 4], 0x7e206c
mov dword [esp], eax
call dword [sym.imp.KERNEL32.DLL_ReadFile]
sub esp, 0x14
test eax, eax
je 0x4d7c34
test byte [ebx + 0x2e], 0x10
je 0x4d7a81
mov eax, dword [ebx + 0x80]
test eax, eax
je 0x4d7c70
cmp dword [ebx + 0x84], 0xffffffff
jne 0x4d7a81
mov eax, dword [ebx + 0x74]
mov dword [esp + 0x14], 4
mov dword [esp + 0x10], 0xffffffff
mov dword [esp + 0xc], edi
mov dword [esp + 8], 0x4d9180
mov dword [esp + 4], eax
lea eax, [ebx + 0x84]
mov dword [esp], eax
call dword [sym.imp.KERNEL32.DLL_RegisterWaitForSingleObject]
sub esp, 0x18
test eax, eax
jne 0x4d7a81
mov ebp, dword [sym.imp.KERNEL32.DLL_GetLastError]
call ebp
test eax, eax
jle 0x4d7c50
call ebp
movzx eax, ax
or eax, 0x80070000
mov dword [ebx + 0x64], eax
mov eax, dword [esi + 0x28]
mov dword [ebx + 0x7c], 0
test eax, eax
je 0x4d7c60
mov edx, dword [eax + 0x38]
mov dword [ebx + 0x7c], edx
mov dword [eax + 0x38], edi
mov dword [esi + 0x28], edi
or dword [ebx + 0x2c], 0x20000
add dword [ebx + 0x3c], 1
add esp, 0x2c
pop ebx
pop esi
pop edi
pop ebp
ret
mov dword [esp + 8], 0x43f
mov dword [esp + 4], str.src_win_pipe.c
mov dword [esp], 0x752288
call fcn.0053e6a0
cmp dword [ebx + 0x94], 0xffffffff
jne 0x4d7a4f
mov dword [esp + 8], 0x441
mov dword [esp + 4], str.src_win_pipe.c
mov dword [esp], str.handle__handle___INVALID_HANDLE_VALUE
call fcn.0053e6a0
jmp 0x4d7a4f
mov dword [esp + 8], 0x43e
mov dword [esp + 4], str.src_win_pipe.c
mov dword [esp], 0x752264
call fcn.0053e6a0
mov eax, dword [ebx + 0x2c]
jmp 0x4d7a37
mov ebp, dword [sym.imp.KERNEL32.DLL_GetLastError]
call ebp
cmp eax, 0x3e5
je 0x4d7b10
jmp 0x4d7b78
call ebp
jmp 0x4d7b8c
mov dword [ebx + 0x7c], edi
mov dword [esi + 0x28], edi
jmp 0x4d7bad
mov dword [esp + 0xc], 0
mov dword [esp + 8], 0
mov dword [esp + 4], 0
mov dword [esp], 0
call dword [sym.imp.KERNEL32.DLL_CreateEventA]
sub esp, 0x10
test eax, eax
mov dword [ebx + 0x80], eax
jne 0x4d7b28
call dword [sym.imp.KERNEL32.DLL_GetLastError]
mov dword [esp + 4], 0x7522db
mov dword [esp], eax
call fcn.004cc730
lea esi, [esi]
push edi
push esi
push ebx
sub esp, 0x30
mov ebx, dword [esp + 0x40]
cmp dword [ebx + 4], 3
mov esi, dword [ebx + 0x44]
mov edi, dword [esi + 4]
je 0x4d7cf2
mov dword [esp + 8], 0x401
mov dword [esp + 4], str.src_win_pipe.c
mov dword [esp], str.req__type__UV_WRITE
call fcn.0053e6a0
cmp dword [esi + 8], 7
je 0x4d7d14
mov dword [esp + 8], 0x402
mov dword [esp + 4], str.src_win_pipe.c
mov dword [esp], str.handle__type__UV_NAMED_PIPE
call fcn.0053e6a0
mov eax, dword [ebx + 0x50]
test eax, eax
je 0x4d7da0
lea edx, [esp + 0x2c]
mov dword [esp + 0x10], 0
mov dword [esp + 0xc], edx
mov edx, dword [ebx + 0x4c]
mov dword [esp + 4], eax
mov dword [esp + 8], edx
mov eax, dword [esi + 0x94]
mov dword [esp], eax
call dword [sym.imp.KERNEL32.DLL_WriteFile]
sub esp, 0x14
test eax, eax
je 0x4d7d85
add ebx, 0x20
mov dword [esp + 8], 0
mov dword [esp + 4], 0
mov dword [esp + 0xc], ebx
mov eax, dword [edi + 0x1c]
mov dword [esp], eax
call dword [sym.imp.KERNEL32.DLL_PostQueuedCompletionStatus]
sub esp, 0x10
test eax, eax
je 0x4d7dc8
add esp, 0x30
xor eax, eax
pop ebx
pop esi
pop edi
ret 4
mov esi, dword [sym.imp.KERNEL32.DLL_GetLastError]
call esi
test eax, eax
jle 0x4d7dc4
call esi
movzx eax, ax
or eax, 0x80070000
mov dword [ebx + 0x20], eax
jmp 0x4d7d50
mov dword [esp + 8], 0x403
mov dword [esp + 4], str.src_win_pipe.c
mov dword [esp], str.req__write_buffer.base
call fcn.0053e6a0
mov eax, dword [ebx + 0x50]
jmp 0x4d7d1f
call esi
jmp 0x4d7d9b
call dword [sym.imp.KERNEL32.DLL_GetLastError]
mov dword [esp + 4], 0x752249
mov dword [esp], eax
call fcn.004cc730
nop