Function at 0x404090
Capabilities:
Create thread
Read file on windows
Write file on windows

Disassembly:
push ebp
mov ebp, esp
push edi
push esi
push ebx
mov ebx, eax
sub esp, 0x18c
test byte [0x406010], 8
jne 0x4042f0
mov dword [esp + 8], 0xa
mov dword [esp + 4], 0
mov dword [esp], ebx
call dword [sym.imp.ucrtbase.dll_wcstol]
mov dword [0x406050], eax
test eax, eax
jne 0x4040f0
mov eax, 1
test byte [0x406010], 2
jne 0x4043d0
lea esp, [ebp - 0xc]
pop ebx
pop esi
pop edi
pop ebp
ret
lea ebx, [ebp - 0x144]
mov dword [esp + 0x10], 0x20
mov dword [esp], ebx
mov dword [esp + 0xc], eax
mov dword [esp + 8], str..pipemsica__x__d
mov dword [esp + 4], 0x18
call sym._swprintf
mov dword [esp], ebx
mov dword [esp + 0x18], 0
mov dword [esp + 0x14], 0
mov dword [esp + 0x10], 3
mov dword [esp + 0xc], 0
mov dword [esp + 8], 0
mov dword [esp + 4], 0xc0000000
call dword [sym.imp.kernel32.dll_CreateFileW]
sub esp, 0x1c
mov ebx, eax
cmp eax, 0xffffffff
je 0x4045f8
mov dword [esp + 4], 0
lea edi, [ebp - 0x154]
lea esi, [ebp - 0x164]
mov dword [esp], 0
call dword [sym.imp.ole32.dll_CoInitializeEx]
sub esp, 8
mov eax, dword fs:[0x18]
mov dword [ebp - 0x16c], eax
jmp 0x404261
mov eax, dword [ebp - 0x16c]
mov dword [esp + 8], 0x10
mov dword [esp + 4], 0
mov eax, dword [eax + 0x30]
mov eax, dword [eax + 0x18]
mov dword [esp], eax
call dword [sym.imp.kernel32.dll_HeapAlloc]
mov edx, dword [edi]
sub esp, 0xc
mov dword [eax], edx
mov edx, dword [edi + 4]
mov dword [eax + 4], edx
mov edx, dword [edi + 8]
mov dword [eax + 8], edx
mov edx, dword [edi + 0xc]
mov dword [eax + 0xc], edx
mov dword [esp + 0x14], 0
mov dword [esp + 0x10], 0
mov dword [esp + 0xc], eax
mov dword [esp + 8], sym._custom_action_thread_4
mov dword [esp + 4], 0
mov dword [esp], 0
call dword [sym.imp.kernel32.dll_CreateThread]
mov dword [ebp - 0x15c], 0
sub esp, 0x18
mov dword [ebp - 0x160], eax
lea eax, [ebp - 0x160]
mov dword [esp + 0x10], 0
mov dword [esp + 0xc], esi
mov dword [esp + 8], 8
mov dword [esp + 4], eax
mov dword [esp], ebx
call dword [sym.imp.kernel32.dll_WriteFile]
sub esp, 0x14
test eax, eax
je 0x404638
cmp dword [ebp - 0x164], 8
jne 0x404638
mov dword [esp + 0x10], 0
mov dword [esp + 0xc], esi
mov dword [esp + 8], 0x10
mov dword [esp + 4], edi
mov dword [esp], ebx
call dword [sym.imp.kernel32.dll_ReadFile]
sub esp, 0x14
test eax, eax
je 0x404620
cmp dword [ebp - 0x164], 0x10
jne 0x404620
mov eax, dword [0x407a2c]
cmp dword [edi], eax
jne 0x4041a0
mov eax, dword [0x407a30]
cmp dword [edi + 4], eax
jne 0x4041a0
mov eax, dword [0x407a34]
cmp dword [edi + 8], eax
jne 0x4041a0
mov eax, dword [0x407a38]
cmp dword [edi + 0xc], eax
jne 0x4041a0
xor eax, eax
mov dword [ebp - 0x16c], eax
call dword [sym.imp.ole32.dll_CoUninitialize]
mov eax, dword [ebp - 0x16c]
jmp 0x4040df
test eax, eax
je 0x404760
shr eax, 0x10
je 0x4044b0
mov dword [esp + 4], 0xffffffff
mov dword [esp], ebx
call dword [sym.imp.kernel32.dll_IsBadStringPtrW]
mov ecx, eax
sub esp, 8
mov eax, str._invalid_
test ecx, ecx
jne 0x4044c3
movzx eax, word [ebx]
test ax, ax
je 0x4047d6
mov edx, ecx
lea ecx, [ecx + 1]
cmp word [ebx + edx*2 + 2], 0
jne 0x404330
mov ecx, 0x224c
mov dword [ebp - 0x16c], ebx
mov esi, ebx
mov word [ebp - 0x144], cx
lea ecx, [ebp - 0x142]
jmp 0x40439b
cmp ax, 9
je 0x4045e0
cmp ax, 0xa
jne 0x40455e
mov eax, 0x6e5c
add ecx, 2
mov word [ecx - 2], ax
lea edi, [edx - 1]
test edx, edx
jle 0x404678
lea eax, [ebp - 0x22]
cmp ecx, eax
ja 0x404678
movzx eax, word [esi]
mov edx, edi
add esi, 2
cmp ax, 0xd
je 0x4045c8
jbe 0x404360
cmp ax, 0x22
je 0x4045b0
cmp ax, 0x5c
jne 0x404551
mov ebx, 0x5c5c
add ecx, 2
mov word [ecx - 2], bx
jmp 0x404380
test ebx, ebx
je 0x404856
mov eax, ebx
shr eax, 0x10
je 0x404800
mov dword [esp + 4], 0xffffffff
mov dword [esp], ebx
call dword [sym.imp.kernel32.dll_IsBadStringPtrW]
mov ecx, eax
sub esp, 8
mov eax, str._invalid_
test ecx, ecx
jne 0x40451c
movzx eax, word [ebx]
test ax, ax
je 0x404778
lea esi, [esi]
mov edx, ecx
lea ecx, [ecx + 1]
cmp word [ebx + edx*2 + 2], 0
jne 0x404418
mov esi, 0x224c
lea edi, [ebp - 0x22]
mov word [ebp - 0x144], si
lea esi, [ebp - 0x142]
jmp 0x404478
cmp ax, 9
je 0x404740
cmp ax, 0xa
jne 0x4046bc
mov eax, 0x6e5c
add esi, 2
mov word [esi - 2], ax
lea ecx, [edx - 1]
cmp esi, edi
ja 0x4044f0
test edx, edx
jle 0x4044f0
movzx eax, word [ebx]
mov edx, ecx
add ebx, 2
cmp ax, 0xd
je 0x404728
jbe 0x404440
cmp ax, 0x22
je 0x404710
cmp ax, 0x5c
jne 0x4046af
mov ecx, 0x5c5c
add esi, 2
mov word [esi - 2], cx
jmp 0x404460
movzx eax, bx
mov dword [esp], str._04x
mov dword [esp + 4], eax
call sym._wine_dbg_sprintf.constprop.0
mov dword [esp + 0x10], eax
mov dword [esp + 0xc], 0x407157
mov dword [esp + 8], str.custom_action_server
mov dword [esp + 4], 0x406010
mov dword [esp], 3
call sym._wine_dbg_log.constprop.0
jmp 0x4040ab
mov byte [esi], 0x22
test ecx, ecx
jle 0x404791
mov edx, 0x2e2e
mov byte [esi + 3], 0x2e
lea eax, [esi + 4]
mov word [esi + 1], dx
mov byte [eax], 0
lea eax, [ebp - 0x144]
mov dword [esp], eax
call sym.___wine_dbg_strdup
mov dword [esp + 0x10], eax
mov dword [esp + 0xc], str.Invalid_parameter__s_n
mov dword [esp + 8], str.custom_action_server
mov dword [esp + 4], 0x406010
mov dword [esp], 1
call sym._wine_dbg_log.constprop.0
lea esp, [ebp - 0xc]
mov eax, 1
pop ebx
pop esi
pop edi
pop ebp
ret
lea edi, [eax - 0x20]
cmp di, 0x5e
jbe 0x404758
mov edi, eax
mov byte [ecx], 0x5c
add ecx, 5
shr di, 0xc
movzx edi, di
movzx ebx, byte [edi + str.0123456789abcdefGCC:__GNU__10.3.0]
mov edi, eax
shr di, 8
and edi, 0xf
mov byte [ecx - 4], bl
movzx ebx, byte [edi + str.0123456789abcdefGCC:__GNU__10.3.0]
mov edi, eax
and eax, 0xf
shr di, 4
movzx eax, byte [eax + str.0123456789abcdefGCC:__GNU__10.3.0]
and edi, 0xf
mov byte [ecx - 3], bl
movzx ebx, byte [edi + str.0123456789abcdefGCC:__GNU__10.3.0]
mov byte [ecx - 1], al
mov byte [ecx - 2], bl
jmp 0x404380
mov edi, 0x225c
add ecx, 2
mov word [ecx - 2], di
jmp 0x404380
mov eax, 0x725c
add ecx, 2
mov word [ecx - 2], ax
jmp 0x404380
mov eax, 0x745c
add ecx, 2
mov word [ecx - 2], ax
jmp 0x404380
test byte [0x406010], 2
jne 0x4047a0
mov eax, dword fs:[0x18]
mov eax, dword [eax + 0x34]
lea esp, [ebp - 0xc]
pop ebx
pop esi
pop edi
pop ebp
ret
test byte [0x406010], 2
jne 0x404820
call dword [sym.imp.ole32.dll_CoUninitialize]
jmp 0x404605
test byte [0x406010], 2
je 0x40462d
mov eax, dword fs:[0x18]
mov eax, dword [eax + 0x34]
mov dword [esp + 0xc], str.Failed_to_write_to_custom_action_server_pipe:__lu_n
mov dword [esp + 8], str.custom_action_server
mov dword [esp + 0x10], eax
mov dword [esp + 4], 0x406010
mov dword [esp], 1
call sym._wine_dbg_log.constprop.0
jmp 0x40462d
mov byte [ecx], 0x22
mov ebx, dword [ebp - 0x16c]
test edi, edi
jle 0x4047ef
mov edx, 0x2e2e
mov byte [ecx + 3], 0x2e
lea eax, [ecx + 4]
mov word [ecx + 1], dx
mov byte [eax], 0
lea eax, [ebp - 0x144]
mov dword [esp], eax
call sym.___wine_dbg_strdup
jmp 0x4044c3
lea ecx, [eax - 0x20]
cmp cx, 0x5e
jbe 0x404770
mov ecx, eax
mov byte [esi], 0x5c
add esi, 5
shr cx, 0xc
movzx ecx, cx
movzx ecx, byte [ecx + str.0123456789abcdefGCC:__GNU__10.3.0]
mov byte [esi - 4], cl
mov ecx, eax
shr cx, 8
and ecx, 0xf
movzx ecx, byte [ecx + str.0123456789abcdefGCC:__GNU__10.3.0]
mov byte [esi - 3], cl
mov ecx, eax
and eax, 0xf
shr cx, 4
movzx eax, byte [eax + str.0123456789abcdefGCC:__GNU__10.3.0]
and ecx, 0xf
movzx ecx, byte [ecx + str.0123456789abcdefGCC:__GNU__10.3.0]
mov byte [esi - 1], al
mov byte [esi - 2], cl
jmp 0x404460
mov eax, 0x225c
add esi, 2
mov word [esi - 2], ax
jmp 0x404460
mov eax, 0x725c
add esi, 2
mov word [esi - 2], ax
jmp 0x404460
mov eax, 0x745c
add esi, 2
mov word [esi - 2], ax
jmp 0x404460
mov byte [ecx], al
inc ecx
jmp 0x404380
mov eax, str._null_
jmp 0x4044c3
mov byte [esi], al
inc esi
jmp 0x404460
mov edi, 0x224c
mov byte [ebp - 0x142], 0x22
lea esi, [ebp - 0x142]
mov word [ebp - 0x144], di
lea eax, [esi + 1]
jmp 0x40450b
mov eax, dword fs:[0x18]
mov eax, dword [eax + 0x34]
mov dword [esp + 0xc], str.Failed_to_create_custom_action_server_pipe:__lu_n
mov dword [esp + 8], str.custom_action_server
mov dword [esp + 0x10], eax
mov dword [esp + 4], 0x406010
mov dword [esp], 1
call sym._wine_dbg_log.constprop.0
jmp 0x404605
mov eax, 0x224c
mov byte [ebp - 0x142], 0x22
lea ecx, [ebp - 0x142]
mov word [ebp - 0x144], ax
lea eax, [ecx + 1]
jmp 0x404699
movzx ebx, bx
mov dword [esp], str._04x
mov dword [esp + 4], ebx
call sym._wine_dbg_sprintf.constprop.0
jmp 0x40451c
mov eax, dword fs:[0x18]
mov eax, dword [eax + 0x34]
mov dword [esp + 0xc], str.Failed_to_read_from_custom_action_server_pipe:__lu_n
mov dword [esp + 8], str.custom_action_server
mov dword [esp + 0x10], eax
mov dword [esp + 4], 0x406010
mov dword [esp], 1
call sym._wine_dbg_log.constprop.0
jmp 0x40462d
mov eax, str._null_
jmp 0x40451c