Function at 0x410780
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x4ea20e
mov eax, dword fs:[0]
push eax
sub esp, 0xb4
mov eax, dword [0x52a394]
xor eax, ebp
mov dword [ebp - 0x10], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov edi, ecx
mov dword [ebp - 0x1c], 0
push 0x2c
mov dword [ebp - 4], 0
call fcn.00493d4a
add esp, 4
mov esi, eax
mov dword [ebp - 0x14], esi
push 0x2c
push 0
push esi
call fcn.004bff80
mov dword [esi], 0xffffffff
add esp, 0xc
mov dword [esi + 4], 0xffffffff
xor eax, eax
mov dword [esi + 0xc], 0
mov ecx, esi
mov dword [esi + 0x20], 0
mov dword [esi + 0x24], 7
mov word [esi + 0x10], ax
mov byte [esi + 0x28], 1
push 0x52c048
mov dword [ebp - 0x1c], esi
mov dword [esi + 0xc], eax
call fcn.00416240
test al, al
jne 0x41096d
push ecx
mov ecx, esi
call fcn.004161b0
lea ecx, [ebp - 0x18]
mov dword [ebp - 0x1c], 0
call fcn.00412ca0
mov byte [ebp - 4], 1
mov ecx, dword [eax]
mov eax, dword [ecx]
mov eax, dword [eax + 4]
call eax
mov bl, al
mov byte [ebp - 4], 2
or esi, 0xffffffff
mov edi, dword [ebp - 0x14]
test edi, edi
je 0x410873
mov ecx, esi
lock xadd dword [edi + 4], ecx
jne 0x410873
mov eax, dword [edi]
mov ecx, edi
call dword [eax]
mov eax, esi
lock xadd dword [edi + 8], eax
jne 0x410873
mov eax, dword [edi]
mov ecx, edi
call dword [eax + 4]
mov byte [ebp - 4], 0
test bl, bl
je 0x410966
sub esp, 8
lea ecx, [ebp - 0xc0]
call fcn.00407970
mov edx, str.send_to_main_connect_pipe_failed:
mov byte [ebp - 4], 3
lea ecx, [ebp - 0xc0]
call fcn.00405b80
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
lea ecx, [ebp - 0xc0]
call fcn.00411c70
lea ecx, [ebp - 0x18]
call fcn.00412ca0
mov byte [ebp - 4], 4
lea edx, [ebp - 0xc0]
mov ecx, dword [eax]
push edx
mov eax, dword [ecx]
call dword [eax + 8]
mov byte [ebp - 4], 5
mov edi, dword [ebp - 0x14]
test edi, edi
je 0x4108f6
mov eax, esi
lock xadd dword [edi + 4], eax
jne 0x4108f6
mov eax, dword [edi]
mov ecx, edi
call dword [eax]
lock xadd dword [edi + 8], esi
dec esi
jne 0x4108f6
mov eax, dword [edi]
mov ecx, edi
call dword [eax + 4]
mov eax, dword [ebp - 0xc0]
mov eax, dword [eax + 4]
mov dword [ebp + eax - 0xc0], vtable.std::basic_ostringstream_wchar_t__struct_std::char_traits_wchar_t___class_std::allocator_wchar_t__.0
mov eax, dword [ebp - 0xc0]
mov ecx, dword [eax + 4]
lea eax, [ecx - 0x50]
mov dword [ebp + ecx - 0xc4], eax
lea ecx, [ebp - 0xbc]
call fcn.00408140
mov eax, dword [ebp - 0xc0]
mov eax, dword [eax + 4]
mov dword [ebp + eax - 0xc0], vtable.std::basic_ostream_wchar_t__struct_std::char_traits_wchar_t__.0
mov eax, dword [ebp - 0xc0]
mov ecx, dword [eax + 4]
lea eax, [ecx - 8]
mov dword [ebp + ecx - 0xc4], eax
lea eax, [ebp - 0x70]
mov byte [ebp - 4], 6
push eax
mov dword [ebp - 0x70], vtable.std::ios_base.0
call fcn.0041d8b2
add esp, 4
xor al, al
jmp 0x410af7
cmp dword [edi + 0x14], 0x10
mov eax, dword [edi + 0x10]
jb 0x410978
mov edi, dword [edi]
push 0
lea ecx, [ebp - 0x14]
mov dword [ebp - 0x14], 0
push ecx
push eax
push edi
push dword [esi + 4]
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
jne 0x410999
mov byte [ebp - 0x14], al
jmp 0x4109ac
mov ecx, dword [esi + 0xc]
test ecx, ecx
je 0x4109a8
mov eax, dword [ecx]
push 0
push esi
call dword [eax + 0xc]
mov byte [ebp - 0x14], 1
mov ecx, esi
call fcn.004163a0
push ecx
mov ecx, esi
call fcn.004161b0
lea ecx, [ebp - 0x24]
mov dword [ebp - 0x1c], 0
call fcn.00412ca0
mov byte [ebp - 4], 7
mov ecx, dword [eax]
mov eax, dword [ecx]
mov eax, dword [eax + 4]
call eax
mov bl, al
mov byte [ebp - 4], 8
or esi, 0xffffffff
mov edi, dword [ebp - 0x20]
test edi, edi
je 0x410a06
mov ecx, esi
lock xadd dword [edi + 4], ecx
jne 0x410a06
mov eax, dword [edi]
mov ecx, edi
call dword [eax]
mov eax, esi
lock xadd dword [edi + 8], eax
jne 0x410a06
mov eax, dword [edi]
mov ecx, edi
call dword [eax + 4]
mov byte [ebp - 4], 0
test bl, bl
je 0x410af5
sub esp, 8
lea ecx, [ebp - 0xc0]
call fcn.00407970
mov edx, str.send_ret:
mov byte [ebp - 4], 9
lea ecx, [ebp - 0xc0]
call fcn.00405b80
push dword [ebp - 0x14]
lea ecx, [ebp - 0xc0]
call fcn.00411df0
lea ecx, [ebp - 0x24]
call fcn.00412ca0
mov byte [ebp - 4], 0xa
lea edx, [ebp - 0xc0]
mov ecx, dword [eax]
push edx
mov eax, dword [ecx]
call dword [eax + 8]
mov byte [ebp - 4], 0xb
mov edi, dword [ebp - 0x20]
test edi, edi
je 0x410a85
mov eax, esi
lock xadd dword [edi + 4], eax
jne 0x410a85
mov eax, dword [edi]
mov ecx, edi
call dword [eax]
lock xadd dword [edi + 8], esi
dec esi
jne 0x410a85
mov eax, dword [edi]
mov ecx, edi
call dword [eax + 4]
mov eax, dword [ebp - 0xc0]
mov eax, dword [eax + 4]
mov dword [ebp + eax - 0xc0], vtable.std::basic_ostringstream_wchar_t__struct_std::char_traits_wchar_t___class_std::allocator_wchar_t__.0
mov eax, dword [ebp - 0xc0]
mov ecx, dword [eax + 4]
lea eax, [ecx - 0x50]
mov dword [ebp + ecx - 0xc4], eax
lea ecx, [ebp - 0xbc]
call fcn.00408140
mov eax, dword [ebp - 0xc0]
mov eax, dword [eax + 4]
mov dword [ebp + eax - 0xc0], vtable.std::basic_ostream_wchar_t__struct_std::char_traits_wchar_t__.0
mov eax, dword [ebp - 0xc0]
mov ecx, dword [eax + 4]
lea eax, [ecx - 8]
mov dword [ebp + ecx - 0xc4], eax
lea eax, [ebp - 0x70]
mov byte [ebp - 4], 0xc
push eax
mov dword [ebp - 0x70], vtable.std::ios_base.0
call fcn.0041d8b2
add esp, 4
mov al, 1
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.00493aac
mov esp, ebp
pop ebp
ret