Function at 0x4103f0
Capabilities:
Create thread
Get common file path
Hide graphical window
Set current directory

Disassembly:
push 0xffffffffffffffff
push 0x4529dc
mov eax, dword fs:[0]
push eax
mov eax, 0x1038
call fcn.00439740
mov eax, dword [0x46b114]
xor eax, esp
mov dword [esp + 0x1034], eax
push ebx
push esi
push edi
mov eax, dword [0x46b114]
xor eax, esp
push eax
lea eax, [esp + 0x1048]
mov dword fs:[0], eax
xor eax, eax
push 0x7fe
mov esi, ecx
push eax
lea ecx, [esp + 0x84e]
push ecx
mov word [esp + 0x850], ax
call sub.MSVCR90.dll_memset
add esp, 0xc
lea edx, [esp + 0x844]
push edx
push 0x400
call dword [sym.imp.KERNEL32.dll_GetCurrentDirectoryW]
push 0x459ee4
lea ecx, [esp + 0x1c]
call dword [sym.imp.MSVCP90.dll_public:_void___thiscall_std::basic_string_wchar_t__struct_std::char_traits_wchar_t___class_std::allocator_wchar_t__::constructor_wchar_t_const__]
xor eax, eax
push 0x3fe
push eax
lea ecx, [esp + 0x44e]
mov dword [esp + 0x1058], 0
push ecx
mov word [esp + 0x450], ax
call sub.MSVCR90.dll_memset
add esp, 0xc
push 0x200
lea edx, [esp + 0x448]
push edx
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
push str....._
lea eax, [esp + 0x448]
push eax
call dword [sym.imp.SHLWAPI.dll_PathAppendW]
lea ecx, [esp + 0x444]
push ecx
lea ecx, [esp + 0x1c]
call dword [sym.imp.MSVCP90.dll_public:_class_std::basic_string_wchar_t__struct_std::char_traits_wchar_t___class_std::allocator_wchar_t______thiscall_std::basic_string_wchar_t__struct_std::char_traits_wchar_t___class_std::allocator_wchar_t__::operator_wchar_t_const__]
cmp dword [esp + 0x2c], 0
jne 0x4104fa
lea ecx, [esp + 0x18]
mov dword [esp + 0x1050], 0xffffffff
call dword [sym.imp.MSVCP90.dll_public:_void___thiscall_std::basic_string_wchar_t__struct_std::char_traits_wchar_t___class_std::allocator_wchar_t__::destructor_void_]
xor eax, eax
jmp 0x41063e
xor edx, edx
push 0x206
push edx
lea eax, [esp + 0x246]
push eax
mov word [esp + 0x248], dx
call sub.MSVCR90.dll_memset
add esp, 0xc
xor ecx, ecx
push 0x206
push ecx
lea edx, [esp + 0x3e]
push edx
mov word [esp + 0x40], cx
call sub.MSVCR90.dll_memset
mov eax, dword [esp + 0x28]
add esp, 0xc
cmp dword [esp + 0x30], 8
jae 0x410543
lea eax, [esp + 0x1c]
mov edi, dword [sym.imp.SHLWAPI.dll_PathCombineW]
push str.Program
push eax
lea eax, [esp + 0x3c]
push eax
call edi
mov ebx, dword [sym.imp.KERNEL32.dll_SetCurrentDirectoryW]
lea ecx, [esp + 0x34]
push ecx
call ebx
cmp dword [esp + 0x30], 8
mov eax, dword [esp + 0x1c]
jae 0x410572
lea eax, [esp + 0x1c]
push str.ProgramDownloadClient.dll
push eax
lea edx, [esp + 0x244]
push edx
call edi
lea eax, [esp + 0x23c]
push eax
call dword [sym.imp.KERNEL32.dll_LoadLibraryW]
lea ecx, [esp + 0x844]
push ecx
mov dword [esi + 0xc0], eax
call ebx
push ecx
mov eax, esp
mov dword [esp + 0x14], esp
push ecx
mov dword [eax], 0
mov eax, esp
mov dword [esp + 0x18], esp
mov dword [eax], 0
call dword [sym.imp.USER32.dll_GetDesktopWindow]
push eax
call fcn.004138e0
test eax, eax
je 0x4105d6
mov edx, dword [esi + 4]
push 0
push edx
call dword [sym.imp.USER32.dll_ShowWindow]
lea eax, [esp + 0x14]
push eax
push 0
push esi
push 0x410670
push 0
push 0
mov dword [esp + 0x2c], 0
call dword [sym.imp.MSVCR90.dll__beginthreadex]
add esp, 0x18
cmp dword [esi + 0x24], 0
jne 0x410617
mov eax, dword [esi + 0xc0]
test eax, eax
je 0x410617
push str.InitDownloadClient
push eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
mov dword [esi + 0x24], eax
mov esi, dword [esi + 0x24]
test esi, esi
je 0x410624
call esi
mov esi, eax
jmp 0x410627
or esi, 0xffffffff
lea ecx, [esp + 0x18]
mov dword [esp + 0x1050], 0xffffffff
call dword [sym.imp.MSVCP90.dll_public:_void___thiscall_std::basic_string_wchar_t__struct_std::char_traits_wchar_t___class_std::allocator_wchar_t__::destructor_void_]
mov eax, esi
mov ecx, dword [esp + 0x1048]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x1034]
xor ecx, esp
call fcn.004390e8
add esp, 0x1044
ret