Function at 0x4021c0
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 [section..data], 8
jne 0x402400
mov dword [esp + 8], 0xa
mov dword [esp + 4], 0
mov dword [esp], ebx
call dword [sym.imp.ucrtbase.dll_wcstol]
mov dword [section..bss], eax
test eax, eax
jne 0x402220
mov eax, 1
test byte [section..data], 2
jne 0x402500
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 dbg.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 0x402728
mov dword [esp + 4], 0
lea edi, [ebp - 0x154]
lea esi, [ebp - 0x164]
mov dword [esp], 0
call sym._CoInitializeEx_8
mov eax, dword fs:[0x18]
mov dword [ebp - 0x16c], eax
sub esp, 8
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 0x402770
cmp dword [ebp - 0x164], 0x10
jne 0x402770
mov eax, dword [edi]
test eax, eax
jne 0x402320
mov eax, dword [edi + 4]
test eax, eax
jne 0x402320
mov eax, dword [edi + 8]
test eax, eax
jne 0x402320
mov eax, dword [edi + 0xc]
test eax, eax
je 0x4024e0
lea esi, [esi]
nop
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], dbg.custom_action_thread
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 0x4023dd
cmp dword [ebp - 0x164], 8
je 0x4022c0
test byte [section..data], 2
jne 0x402920
call sym._CoUninitialize_0
mov eax, dword fs:[0x18]
mov eax, dword [eax + 0x34]
lea esp, [ebp - 0xc]
pop ebx
pop esi
pop edi
pop ebp
ret
test eax, eax
je 0x4028a8
shr eax, 0x10
je 0x4025e0
mov dword [esp + 4], 0xffffffff
mov dword [esp], ebx
call dword [sym.imp.kernel32.dll_IsBadStringPtrW]
mov esi, eax
sub esp, 8
mov eax, str._invalid_
test esi, esi
jne 0x4025f3
movzx edx, word [ebx]
test dx, dx
je 0x4028e3
mov ecx, esi
lea esi, [esi + 1]
cmp word [ebx + ecx*2 + 2], 0
jne 0x402440
mov esi, 0x224c
mov dword [ebp - 0x16c], ebx
lea eax, [ebp - 0x142]
mov word [ebp - 0x144], si
mov esi, ebx
jmp 0x4024ab
cmp dx, 9
je 0x4026a0
cmp dx, 0xa
jne 0x4026be
mov edi, 0x6e5c
add eax, 2
mov word [eax - 2], di
lea edi, [ecx - 1]
test ecx, ecx
jle 0x4027b8
lea ecx, [ebp - 0x22]
cmp eax, ecx
ja 0x4027b8
movzx edx, word [esi]
mov ecx, edi
add esi, 2
cmp dx, 0xd
je 0x402688
jbe 0x402470
cmp dx, 0x22
je 0x402710
cmp dx, 0x5c
jne 0x4026b1
mov ebx, 0x5c5c
add eax, 2
mov word [eax - 2], bx
jmp 0x402490
xor eax, eax
mov dword [ebp - 0x16c], eax
call sym._CoUninitialize_0
mov eax, dword [ebp - 0x16c]
lea esp, [ebp - 0xc]
pop ebx
pop esi
pop edi
pop ebp
ret
test ebx, ebx
je 0x402956
mov eax, ebx
shr eax, 0x10
je 0x402908
mov dword [esp + 4], 0xffffffff
mov dword [esp], ebx
call dword [sym.imp.kernel32.dll_IsBadStringPtrW]
mov esi, eax
sub esp, 8
mov eax, str._invalid_
test esi, esi
jne 0x40264c
movzx edx, word [ebx]
test dx, dx
je 0x4028c2
lea esi, [esi]
mov ecx, esi
lea esi, [esi + 1]
cmp word [ebx + ecx*2 + 2], 0
jne 0x402548
mov edi, 0x224c
lea esi, [ebp - 0x142]
mov word [ebp - 0x144], di
lea edi, [ebp - 0x22]
jmp 0x4025a8
cmp dx, 9
je 0x402868
cmp dx, 0xa
jne 0x4027fc
mov eax, 0x6e5c
add esi, 2
mov word [esi - 2], ax
lea eax, [ecx - 1]
cmp esi, edi
ja 0x402620
test ecx, ecx
jle 0x402620
movzx edx, word [ebx]
mov ecx, eax
add ebx, 2
cmp dx, 0xd
je 0x402880
jbe 0x402570
cmp dx, 0x22
je 0x402850
cmp dx, 0x5c
jne 0x4027ef
mov eax, 0x5c5c
add esi, 2
mov word [esi - 2], ax
jmp 0x402590
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], 0x4078e0
mov dword [esp + 4], 0x406000
mov dword [esp], 3
call sym._wine_dbg_log.constprop.0
jmp 0x4021db
mov byte [esi], 0x22
test eax, eax
jle 0x4028db
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 dbg.__wine_dbg_strdup
mov dword [esp + 0x10], eax
mov dword [esp + 0xc], str.Invalid_parameter__s_n
mov dword [esp + 8], 0x4078e0
mov dword [esp + 4], 0x406000
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
mov ebx, 0x725c
add eax, 2
mov word [eax - 2], bx
jmp 0x402490
mov edx, 0x745c
add eax, 2
mov word [eax - 2], dx
jmp 0x402490
lea edi, [edx - 0x20]
cmp di, 0x5e
jbe 0x402898
mov edi, edx
mov byte [eax], 0x5c
add eax, 5
shr di, 0xc
movzx edi, di
movzx ebx, byte [edi + str.0123456789abcdefcustom_action_server]
mov edi, edx
shr di, 8
and edi, 0xf
mov byte [eax - 4], bl
movzx ebx, byte [edi + str.0123456789abcdefcustom_action_server]
mov edi, edx
and edx, 0xf
shr di, 4
movzx edx, byte [edx + str.0123456789abcdefcustom_action_server]
and edi, 0xf
mov byte [eax - 3], bl
movzx ebx, byte [edi + str.0123456789abcdefcustom_action_server]
mov byte [eax - 1], dl
mov byte [eax - 2], bl
jmp 0x402490
mov edi, 0x225c
add eax, 2
mov word [eax - 2], di
jmp 0x402490
test byte [section..data], 2
je 0x4023ef
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], 0x4078e0
mov dword [esp + 0x10], eax
mov dword [esp + 4], 0x406000
mov dword [esp], 1
call sym._wine_dbg_log.constprop.0
jmp 0x4023ef
test byte [section..data], 2
je 0x4023ea
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], 0x4078e0
mov dword [esp + 0x10], eax
mov dword [esp + 4], 0x406000
mov dword [esp], 1
call sym._wine_dbg_log.constprop.0
jmp 0x4023ea
mov byte [eax], 0x22
mov ebx, dword [ebp - 0x16c]
test edi, edi
jle 0x4028fc
mov ecx, 0x2e2e
mov byte [eax + 3], 0x2e
lea edx, [eax + 4]
mov word [eax + 1], cx
lea eax, [ebp - 0x144]
mov byte [edx], 0
mov dword [esp], eax
call dbg.__wine_dbg_strdup
jmp 0x4025f3
lea eax, [edx - 0x20]
cmp ax, 0x5e
jbe 0x4028b8
mov eax, edx
mov byte [esi], 0x5c
add esi, 5
shr ax, 0xc
movzx eax, ax
movzx eax, byte [eax + str.0123456789abcdefcustom_action_server]
mov byte [esi - 4], al
mov eax, edx
shr ax, 8
and eax, 0xf
movzx eax, byte [eax + str.0123456789abcdefcustom_action_server]
mov byte [esi - 3], al
mov eax, edx
and edx, 0xf
shr ax, 4
and eax, 0xf
movzx eax, byte [eax + str.0123456789abcdefcustom_action_server]
mov byte [esi - 2], al
movzx eax, byte [edx + str.0123456789abcdefcustom_action_server]
mov byte [esi - 1], al
jmp 0x402590
mov eax, 0x225c
add esi, 2
mov word [esi - 2], ax
jmp 0x402590
mov eax, 0x745c
add esi, 2
mov word [esi - 2], ax
jmp 0x402590
mov eax, 0x725c
add esi, 2
mov word [esi - 2], ax
jmp 0x402590
mov byte [eax], dl
add eax, 1
jmp 0x402490
mov eax, str._null_
jmp 0x4025f3
mov byte [esi], dl
add esi, 1
jmp 0x402590
mov eax, 0x224c
mov byte [ebp - 0x142], 0x22
lea esi, [ebp - 0x142]
mov word [ebp - 0x144], ax
lea eax, [esi + 1]
jmp 0x40263b
mov byte [ebp - 0x142], 0x22
mov eax, 0x224c
mov word [ebp - 0x144], ax
lea eax, [ebp - 0x142]
lea edx, [eax + 1]
jmp 0x4027d9
movzx ebx, bx
mov dword [esp], str._04x
mov dword [esp + 4], ebx
call sym._wine_dbg_sprintf.constprop.0
jmp 0x40264c
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], 0x4078e0
mov dword [esp + 0x10], eax
mov dword [esp + 4], 0x406000
mov dword [esp], 1
call sym._wine_dbg_log.constprop.0
jmp 0x4023ea
mov eax, str._null_
jmp 0x40264c