Function at 0x403d50
Capabilities:
Create thread
Delete file
Query or enumerate registry value
Set current directory
Set registry value

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
mov eax, dword fs:[0]
mov ecx, dword [ebp + 8]
push 0xffffffffffffffff
push 0x454b58
push eax
mov dword fs:[0], esp
sub esp, 0xc78
push ebx
push esi
push edi
lea eax, [esp + 0x4c]
push eax
xor ebx, ebx
push ebx
push ecx
push 0x403cc0
push ebx
push ebx
call fcn.00408b77
add esp, 0x18
cmp byte [0x466538], bl
jne 0x403da7
push 0x64
call dword [sym.imp.KERNEL32.dll_Sleep]
cmp byte [0x466538], bl
je 0x403d97
call fcn.00401f60
test al, al
je 0x404193
lea edx, [esp + 0x3c]
push edx
call dword [sym.imp.KERNEL32.dll_GetSystemTimeAsFileTime]
call fcn.00401fe0
test al, al
je 0x404193
call fcn.004021b0
test al, al
je 0x404193
push 0x206
lea ecx, [esp + 0x25e]
xor eax, eax
push ebx
push ecx
mov word [esp + 0x264], ax
call fcn.00411290
add esp, 0xc
push 0x104
lea edx, [esp + 0x25c]
push edx
push ebx
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
lea eax, [esp + 0x258]
push eax
call dword [sym.imp.SHLWAPI.dll_PathRemoveFileSpecW]
push 0x206
lea edx, [esp + 0x466]
xor ecx, ecx
push ebx
push edx
mov word [esp + 0x46c], cx
call fcn.00411290
add esp, 0xc
push 0x1d4
lea eax, [esp + 0x8a8]
push ebx
mov ecx, 0xd
mov esi, str.C:PearlabyssBlackDesert
lea edi, [esp + 0x878]
push eax
rep movsd dword es:[edi], dword [esi]
call fcn.00411290
mov ecx, 0xa
mov esi, str.SoftwareBlackDesert
lea edi, [esp + 0xa84]
rep movsd dword es:[edi], dword [esi]
add esp, 0xc
push 0x1de
lea ecx, [esp + 0xaa6]
push ebx
push ecx
movsw word es:[edi], word [esi]
call fcn.00411290
add esp, 0xc
push 0x1d8
lea edx, [esp + 0x69c]
push ebx
mov ecx, 0xc
mov esi, str.SoftwareBlackDesert_TW
lea edi, [esp + 0x670]
push edx
rep movsd dword es:[edi], dword [esi]
call fcn.00411290
mov esi, dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
add esp, 0xc
lea eax, [esp + 0x38]
push eax
push 0xf003f
push ebx
lea ecx, [esp + 0xa84]
push ecx
push reloc.WS2_32.dll_bind
mov byte [esp + 0x23], bl
call esi
mov edi, dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
cmp eax, ebx
jne 0x403f62
mov ecx, dword [esp + 0x38]
lea edx, [esp + 0x10]
push edx
lea eax, [esp + 0x54]
push eax
push ebx
push ebx
push str.Path
push ecx
mov dword [esp + 0x28], 0x104
call edi
lea edx, [esp + 0x34]
push edx
push 0xf003f
push ebx
lea eax, [esp + 0x674]
push eax
push reloc.WS2_32.dll_bind
call esi
cmp eax, ebx
jne 0x403f57
lea ecx, [esp + 0x50]
push ecx
call dword [sym.imp.KERNEL32.dll_lstrlenW]
mov ecx, dword [esp + 0x34]
lea edx, [eax + eax + 2]
push edx
lea eax, [esp + 0x54]
push eax
push 1
push ebx
push str.Path
push ecx
call dword [sym.imp.ADVAPI32.dll_RegSetValueExW]
mov edx, dword [esp + 0x34]
push edx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov eax, dword [esp + 0x38]
push eax
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
sub esp, 0x1c
mov esi, esp
xor ecx, ecx
lea eax, [esp + 0x274]
mov dword [esi + 0x14], 7
mov dword [esi + 0x10], ebx
mov dword [esp + 0x30], esp
mov word [esi], cx
lea edx, [eax + 2]
mov cx, word [eax]
add eax, 2
cmp cx, bx
jne 0x403f84
sub eax, edx
sar eax, 1
push eax
lea eax, [esp + 0x278]
call fcn.00406650
mov dword [esp + 0xca8], ebx
or esi, 0xffffffff
mov dword [esp + 0xca8], esi
call fcn.004029c0
add esp, 0x1c
test al, al
je 0x4040fd
lea edx, [esp + 0x10]
push edx
push 0xf003f
push ebx
lea eax, [esp + 0x674]
push eax
push reloc.WS2_32.dll_bind
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
cmp eax, ebx
jne 0x404080
mov eax, dword [esp + 0x10]
lea ecx, [esp + 0x14]
push ecx
lea edx, [esp + 0x54]
push edx
push ebx
push ebx
push str.Path
push eax
mov dword [esp + 0x2c], 0x104
call edi
lea ecx, [esp + 0x50]
lea eax, [esp + 0x258]
mov dx, word [eax]
cmp dx, word [ecx]
jne 0x404038
cmp dx, bx
je 0x404034
mov dx, word [eax + 2]
cmp dx, word [ecx + 2]
jne 0x404038
add eax, 4
add ecx, 4
cmp dx, bx
jne 0x404012
xor eax, eax
jmp 0x40403c
sbb eax, eax
sbb eax, esi
cmp eax, ebx
je 0x404045
mov byte [esp + 0xf], 1
lea ecx, [esp + 0x258]
push ecx
call dword [sym.imp.KERNEL32.dll_lstrlenW]
mov ecx, dword [esp + 0x10]
lea edx, [eax + eax + 2]
push edx
lea eax, [esp + 0x25c]
push eax
push 1
push ebx
push str.Path
push ecx
call dword [sym.imp.ADVAPI32.dll_RegSetValueExW]
mov edx, dword [esp + 0x10]
push edx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
jmp 0x4040d9
push ebx
lea eax, [esp + 0x14]
push eax
push ebx
push 0xf003f
push ebx
push str.REG_
push ebx
lea ecx, [esp + 0x684]
push ecx
push reloc.WS2_32.dll_bind
call dword [sym.imp.ADVAPI32.dll_RegCreateKeyExW]
lea edx, [esp + 0x258]
push edx
call dword [sym.imp.KERNEL32.dll_lstrlenW]
mov edx, dword [esp + 0x10]
lea eax, [eax + eax + 2]
push eax
lea ecx, [esp + 0x25c]
push ecx
push 1
push ebx
push str.Path
push edx
call dword [sym.imp.ADVAPI32.dll_RegSetValueExW]
mov byte [esp + 0xf], 1
xor eax, eax
jmp 0x4040e0
movzx ecx, word [esp + eax + 0x258]
mov word [esp + eax + 0x460], cx
add eax, 2
cmp cx, bx
jne 0x4040e0
jmp 0x404295
lea eax, [esp + 0x870]
call fcn.00407c20
lea eax, [esp + 0x10]
push eax
push 0xf003f
push ebx
lea ecx, [esp + 0x674]
push ecx
push reloc.WS2_32.dll_bind
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
cmp eax, ebx
je 0x404244
xor edx, edx
mov dword [esp + 0x2c], 7
mov dword [esp + 0x28], ebx
mov word [esp + 0x18], dx
mov dword [esp + 0xc8c], 1
lea eax, [esp + 0x18]
push eax
sub esp, 0x1c
lea eax, [esp + 0x890]
mov ecx, esp
mov dword [esp + 0x34], esp
call fcn.00406740
mov byte [esp + 0xcac], 2
mov byte [esp + 0xcac], 1
call fcn.004030b0
add esp, 0x20
test al, al
jne 0x4041ad
mov dword [esp + 0xc8c], esi
lea esi, [esp + 0x18]
call fcn.00406130
or eax, 0xffffffff
mov ecx, dword [esp + 0xc84]
mov dword fs:[0], ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0x10
cmp dword [esp + 0x2c], 8
mov eax, dword [esp + 0x18]
jae 0x4041bc
lea eax, [esp + 0x18]
lea edx, [esp + 0x50]
sub edx, eax
movzx ecx, word [eax]
mov word [edx + eax], cx
add eax, 2
cmp cx, bx
jne 0x4041c2
push ebx
lea ecx, [esp + 0x14]
push ecx
push ebx
push 0xf003f
push ebx
push str.REG_
push ebx
lea edx, [esp + 0x684]
push edx
push reloc.WS2_32.dll_bind
call dword [sym.imp.ADVAPI32.dll_RegCreateKeyExW]
lea eax, [esp + 0x50]
push eax
call dword [sym.imp.KERNEL32.dll_lstrlenW]
lea ecx, [eax + eax + 2]
mov eax, dword [esp + 0x10]
push ecx
lea edx, [esp + 0x54]
push edx
push 1
push ebx
push str.Path
push eax
call dword [sym.imp.ADVAPI32.dll_RegSetValueExW]
mov ecx, dword [esp + 0x10]
push ecx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov byte [esp + 0xf], 1
mov dword [esp + 0xc8c], esi
lea esi, [esp + 0x18]
call fcn.00406130
or esi, 0xffffffff
jmp 0x40426f
mov ecx, dword [esp + 0x10]
lea edx, [esp + 0x14]
push edx
lea eax, [esp + 0x54]
push eax
push ebx
push ebx
push str.Path
push ecx
mov dword [esp + 0x2c], 0x104
call edi
mov edx, dword [esp + 0x10]
push edx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
xor eax, eax
jmp 0x404280
movzx ecx, word [esp + eax + 0x50]
mov word [esp + eax + 0x460], cx
add eax, 2
cmp cx, bx
jne 0x404280
lea eax, [esp + 0x460]
push eax
call dword [sym.imp.KERNEL32.dll_SetCurrentDirectoryW]
mov edi, dword [sym.imp.USER32.dll_MessageBoxW]
test eax, eax
jne 0x40445f
mov ecx, dword [0x4666b8]
mov edx, dword [0x466530]
push ebx
push str.Launcher
push ecx
push edx
call edi
lea eax, [esp + 0x10]
push eax
push 0xf003f
push ebx
lea ecx, [esp + 0x674]
push ecx
push reloc.WS2_32.dll_bind
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
cmp eax, ebx
jne 0x404449
mov eax, 7
xor edx, edx
mov dword [esp + 0x2c], eax
mov dword [esp + 0x28], ebx
mov word [esp + 0x18], dx
mov dword [esp + 0xc8c], 3
lea ecx, [esp + 0x18]
push ecx
sub esp, 0x1c
mov esi, esp
mov dword [esi + 0x14], eax
mov dword [esi + 0x10], ebx
lea eax, [esp + 0x890]
mov word [esi], dx
mov dword [esp + 0x34], esp
lea edx, [eax + 2]
lea ecx, [ecx]
mov cx, word [eax]
add eax, 2
cmp cx, bx
jne 0x404330
sub eax, edx
sar eax, 1
push eax
lea eax, [esp + 0x894]
call fcn.00406650
mov byte [esp + 0xcac], 4
mov byte [esp + 0xcac], 3
call fcn.004030b0
add esp, 0x20
test al, al
je 0x4044ab
mov eax, dword [esp + 0x18]
mov esi, 8
cmp dword [esp + 0x2c], esi
jae 0x40437f
lea eax, [esp + 0x18]
lea edx, [esp + 0x50]
sub edx, eax
movzx ecx, word [eax]
mov word [eax + edx], cx
add eax, 2
cmp cx, bx
jne 0x404385
push ebx
lea eax, [esp + 0x14]
push eax
push ebx
push 0xf003f
push ebx
push str.REG_
push ebx
lea ecx, [esp + 0x684]
push ecx
push reloc.WS2_32.dll_bind
call dword [sym.imp.ADVAPI32.dll_RegCreateKeyExW]
lea edx, [esp + 0x50]
push edx
call dword [sym.imp.KERNEL32.dll_lstrlenW]
mov edx, dword [esp + 0x10]
lea eax, [eax + eax + 2]
push eax
lea ecx, [esp + 0x54]
push ecx
push 1
push ebx
push str.Path
push edx
call dword [sym.imp.ADVAPI32.dll_RegSetValueExW]
mov eax, dword [esp + 0x10]
push eax
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov byte [esp + 0xf], 1
xor eax, eax
jmp 0x404400
movzx ecx, word [esp + eax + 0x50]
mov word [esp + eax + 0x460], cx
add eax, 2
cmp cx, bx
jne 0x404400
mov dword [esp + 0xc8c], 0xffffffff
cmp dword [esp + 0x2c], esi
jb 0x404433
mov ecx, dword [esp + 0x18]
push ecx
call fcn.00408104
add esp, 4
xor edx, edx
mov dword [esp + 0x2c], 7
mov dword [esp + 0x28], ebx
mov word [esp + 0x18], dx
or esi, 0xffffffff
lea eax, [esp + 0x460]
push eax
call dword [sym.imp.KERNEL32.dll_SetCurrentDirectoryW]
test eax, eax
je 0x4042b1
sub esp, 0x1c
lea eax, [esp + 0x47c]
mov ecx, esp
mov dword [esp + 0x30], esp
call fcn.00406740
mov dword [esp + 0xca8], 5
mov dword [esp + 0xca8], esi
call fcn.00402390
add esp, 0x1c
test al, al
jne 0x4044d9
mov eax, esi
mov ecx, dword [esp + 0xc84]
mov dword fs:[0], ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0x10
mov dword [esp + 0xc8c], 0xffffffff
lea esi, [esp + 0x18]
call fcn.00406130
or eax, 0xffffffff
mov ecx, dword [esp + 0xc84]
mov dword fs:[0], ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0x10
cmp byte [esp + 0xf], 0
je 0x404544
mov ecx, dword [0x46670c]
mov edx, dword [0x466530]
push 4
push str.Launcher
push ecx
push edx
call edi
cmp eax, 6
jne 0x404544
sub esp, 0x1c
lea eax, [esp + 0x47c]
mov ecx, esp
mov dword [esp + 0x30], esp
call fcn.00406740
mov dword [esp + 0xca8], 6
mov dword [esp + 0xca8], esi
call fcn.00402d10
add esp, 0x1c
test al, al
jne 0x404544
mov eax, dword [0x466710]
mov ecx, dword [0x466530]
push ebx
push str.Launcher
push eax
push ecx
call edi
call fcn.00402770
push str.patcher_version_tmp
mov bl, al
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
test bl, bl
je 0x404193
mov edx, dword [ebp + 0x10]
sub esp, 0x1c
lea eax, [esp + 0x47c]
mov ecx, esp
mov dword [0x465498], edx
mov dword [esp + 0x30], esp
call fcn.00406740
mov dword [esp + 0xca8], 7
mov dword [esp + 0xca8], 0xffffffff
call fcn.004034c0
add esp, 0x1c
test al, al
je 0x404193
lea eax, [esp + 0x44]
push eax
call dword [sym.imp.KERNEL32.dll_GetSystemTimeAsFileTime]
mov ecx, dword [esp + 0x48]
mov eax, dword [esp + 0x44]
mov ebx, dword [esp + 0x3c]
push 0
push 0x989680
push ecx
push eax
call fcn.0044e3e0
push 0
mov edi, eax
mov eax, dword [esp + 0x44]
push 0x989680
push eax
push ebx
mov esi, edx
call fcn.0044e3e0
sub edi, eax
sbb esi, edx
test esi, esi
jg 0x4045f3
jl 0x4045ec
cmp edi, 1
jae 0x4045f3
mov eax, 0x3e8
jmp 0x4045f5
xor eax, eax
push eax
call dword [sym.imp.KERNEL32.dll_Sleep]
mov ecx, dword [esp + 0xc84]
pop edi
pop esi
xor eax, eax
mov dword fs:[0], ecx
pop ebx
mov esp, ebp
pop ebp
ret 0x10