Function at 0x1050997
Capabilities:
Create thread
Get common file path
Link many functions at runtime
Move file
Query environment variable

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x854
mov eax, dword [0x10687d0]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 8]
mov ecx, dword [ebp + 0xc]
push ebx
push esi
push edi
xor ebx, ebx
mov edi, 0x1019a84
push edi
push eax
lea eax, [ebp - 0x81c]
push eax
mov dword [ebp - 0x840], ecx
mov dword [ebp - 0x82c], ebx
mov dword [ebp - 0x818], ebx
mov dword [ebp - 0x824], ebx
mov dword [ebp - 0x81c], ebx
mov dword [ebp - 0x828], ebx
mov dword [ebp - 0x834], 3
mov dword [ebp - 0x820], ebx
mov dword [ebp - 0x830], ebx
call fcn.0105e39d
mov esi, eax
cmp esi, ebx
jl 0x1050ace
push dword [ebp - 0x81c]
mov ebx, dword [sym.imp.KERNEL32.dll_LoadLibraryW]
call ebx
mov dword [0x1068e7c], eax
test eax, eax
jne 0x1050b3e
push 0x104
lea eax, [ebp - 0x414]
push eax
call dword [sym.imp.KERNEL32.dll_GetWindowsDirectoryW]
test eax, eax
jne 0x1050a6a
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, eax
test esi, esi
jle 0x1050a59
and esi, 0xffff
or esi, 0x80070000
test esi, esi
jl 0x1050a60
mov esi, 0x80004005
push 0x1019a4c
jmp 0x1050cb0
lea eax, [ebp - 0x414]
push eax
lea eax, [ebp - 0x81c]
push eax
call fcn.0105e587
mov esi, eax
test esi, esi
jge 0x1050a94
lea eax, [ebp - 0x414]
push eax
push 0x1019a14
jmp 0x1050b37
lea eax, [ebp - 0x81c]
push eax
call fcn.0105e611
mov esi, eax
test esi, esi
jge 0x1050ab6
push dword [ebp - 0x81c]
push 0x10199dc
jmp 0x1050b37
push edi
push 0x10192e0
lea eax, [ebp - 0x81c]
push eax
call fcn.0105e39d
mov esi, eax
test esi, esi
jge 0x1050ad8
push 0x10199ac
jmp 0x1050cb0
push dword [ebp - 0x81c]
call ebx
mov dword [0x1068e7c], eax
test eax, eax
jne 0x1050b3e
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x7e
jne 0x1050b13
push dword [ebp - 0x81c]
xor edi, edi
push 0x1019958
inc edi
push edi
push edi
call fcn.0104fee2
add esp, 0x10
mov esi, edi
jmp 0x10510b2
test eax, eax
jle 0x1050b21
and eax, 0xffff
or eax, 0x80070000
mov esi, eax
test esi, esi
jl 0x1050b2c
mov esi, 0x80004005
push dword [ebp - 0x81c]
push 0x1019934
push 1
jmp 0x1050ee6
mov esi, dword [sym.imp.KERNEL32.dll_GetProcAddress]
push 0x1019924
push eax
call esi
xor ebx, ebx
mov dword [0x1068e80], eax
cmp eax, ebx
jne 0x1050b80
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, ebx
jle 0x1050b6b
and eax, 0xffff
or eax, 0x80070000
cmp eax, ebx
mov esi, eax
jl 0x1050b76
mov esi, 0x80004005
push 0x10198f4
jmp 0x1050cb0
push 0x10198dc
push dword [0x1068e7c]
call esi
mov dword [0x1068e84], eax
cmp eax, ebx
jne 0x1050bbf
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, ebx
jle 0x1050baa
and eax, 0xffff
or eax, 0x80070000
cmp eax, ebx
mov esi, eax
jl 0x1050bb5
mov esi, 0x80004005
push 0x10198a4
jmp 0x1050cb0
push 0x1019890
push dword [0x1068e7c]
call esi
mov dword [0x1068e88], eax
cmp eax, ebx
jne 0x1050bfe
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, ebx
jle 0x1050be9
and eax, 0xffff
or eax, 0x80070000
cmp eax, ebx
mov esi, eax
jl 0x1050bf4
mov esi, 0x80004005
push 0x101985c
jmp 0x1050cb0
push 0x1018dbc
push dword [0x1068e7c]
call esi
mov dword [0x1068e8c], eax
cmp eax, ebx
jne 0x1050c3a
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, ebx
jle 0x1050c28
and eax, 0xffff
or eax, 0x80070000
cmp eax, ebx
mov esi, eax
jl 0x1050c33
mov esi, 0x80004005
push 0x1018d88
jmp 0x1050cb0
push 0x1018d70
push dword [0x1068e7c]
call esi
mov dword [0x1068e90], eax
cmp eax, ebx
jne 0x1050c76
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, ebx
jle 0x1050c64
and eax, 0xffff
or eax, 0x80070000
cmp eax, ebx
mov esi, eax
jl 0x1050c6f
mov esi, 0x80004005
push 0x1018d38
jmp 0x1050cb0
push 0x1018d2c
push dword [0x1068e7c]
call esi
mov dword [0x1068e94], eax
cmp eax, ebx
jne 0x1050cb7
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, ebx
jle 0x1050ca0
and eax, 0xffff
or eax, 0x80070000
cmp eax, ebx
mov esi, eax
jl 0x1050cab
mov esi, 0x80004005
push 0x1018d00
push 1
jmp 0x105106c
lea eax, [ebp - 0x818]
push eax
lea eax, [ebp - 0x82c]
push eax
call fcn.0104ff6e
xor edi, edi
mov esi, eax
inc edi
cmp esi, ebx
jge 0x1050ce2
push 0x1019810
push edi
push esi
call fcn.0104fee2
add esp, 0xc
mov eax, dword [ebp - 0x82c]
mov dword [ebp - 0x828], eax
cmp eax, ebx
jne 0x1051005
xor eax, eax
push 0x3fe
mov word [ebp - 0x814], ax
lea eax, [ebp - 0x812]
push ebx
push eax
call sub.msvcrt.dll_memset
add esp, 0xc
push 0x200
lea eax, [ebp - 0x814]
push eax
push 0x10197c8
call dword [sym.imp.KERNEL32.dll_GetEnvironmentVariableW]
dec eax
cmp eax, 0x1fe
ja 0x1050da1
lea eax, [ebp - 0x814]
push eax
lea eax, [ebp - 0x818]
push eax
call fcn.0105e587
mov esi, eax
cmp esi, ebx
jge 0x1050d5d
lea eax, [ebp - 0x814]
push eax
push 0x10197a0
jmp 0x1050ee5
mov dword [ebp - 0x828], edi
push 0x9000
push dword [ebp - 0x818]
call dword [0x1068e84]
test eax, eax
jne 0x105107f
push dword [ebp - 0x818]
push dword [ebp - 0x81c]
push 0x1019768
mov esi, 0x8000ffff
push edi
push esi
call fcn.0104fee2
add esp, 0x14
jmp 0x10510b2
lea eax, [ebp - 0x828]
push eax
push 0x1019754
push edi
push 0x1003910
mov ebx, 0x80000002
push ebx
call fcn.0105dfa8
test eax, eax
jl 0x1051061
cmp dword [ebp - 0x828], 0
jbe 0x1051061
push 0x104
lea eax, [ebp - 0x20c]
push eax
call dword [sym.imp.KERNEL32.dll_GetWindowsDirectoryW]
test eax, eax
jne 0x1050e14
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, eax
test esi, esi
jle 0x1050e03
and esi, 0xffff
or esi, 0x80070000
test esi, esi
jl 0x1050e0a
mov esi, 0x80004005
push 0x1019724
jmp 0x105106b
lea eax, [ebp - 0x20c]
push eax
lea eax, [ebp - 0x818]
push eax
call fcn.0105e587
mov esi, eax
test esi, esi
jge 0x1050e3e
lea eax, [ebp - 0x20c]
push eax
push 0x10196e8
jmp 0x1050ee5
lea eax, [ebp - 0x818]
push eax
call fcn.0105e611
mov esi, eax
test esi, esi
jge 0x1050e60
push dword [ebp - 0x818]
push 0x10196ac
jmp 0x1050ee5
push 0x1019698
lea eax, [ebp - 0x818]
push eax
call fcn.0105e2c7
mov esi, eax
test esi, esi
jge 0x1050e84
push dword [ebp - 0x818]
push 0x1019660
jmp 0x1050ee5
push 0
push dword [ebp - 0x818]
call fcn.0105e814
push dword [ebp - 0x818]
mov esi, eax
test esi, esi
jge 0x1050ea4
push 0x101962c
jmp 0x1050ee5
lea eax, [ebp - 0x820]
push eax
call fcn.0105e587
mov esi, eax
test esi, esi
jge 0x1050ec3
push dword [ebp - 0x818]
push 0x1019604
jmp 0x1050ee5
push 0x10195f0
lea eax, [ebp - 0x818]
push eax
call fcn.0105e2c7
mov esi, eax
test esi, esi
jge 0x1050ef4
push dword [ebp - 0x818]
push 0x10195c4
push edi
push esi
call fcn.0104fee2
add esp, 0x10
jmp 0x10510b2
and dword [ebp - 0x83c], 0
and dword [ebp - 0x838], 0
lea eax, [ebp - 0x83c]
push eax
push dword [ebp - 0x818]
call fcn.0105e6bf
test eax, eax
jl 0x1051003
cmp dword [ebp - 0x838], 0
ja 0x1050f35
cmp dword [ebp - 0x83c], 0xf00000
jbe 0x1051003
lea eax, [ebp - 0x834]
push eax
push 0x10195b8
push edi
push 0x1019550
push ebx
call fcn.0105dfa8
test eax, eax
jl 0x1050f5e
cmp dword [ebp - 0x834], 2
je 0x1051003
lea eax, [ebp - 0x850]
push eax
call dword [sym.imp.KERNEL32.dll_GetSystemTime]
movzx eax, word [ebp - 0x844]
push eax
movzx eax, word [ebp - 0x846]
push eax
movzx eax, word [ebp - 0x848]
push eax
movzx eax, word [ebp - 0x84a]
push eax
movzx eax, word [ebp - 0x84e]
push eax
movzx eax, word [ebp - 0x850]
push eax
push dword [ebp - 0x820]
lea eax, [ebp - 0x824]
push 0x10194f8
push eax
call fcn.0105e67d
add esp, 0x24
test eax, eax
jl 0x105104a
push edi
push dword [ebp - 0x824]
push dword [ebp - 0x818]
call dword [sym.imp.KERNEL32.dll_MoveFileExW]
test eax, eax
jne 0x1051003
call dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
jle 0x1050fe8
and eax, 0xffff
or eax, 0x80070000
push dword [ebp - 0x824]
push dword [ebp - 0x818]
push 0x10194b8
push edi
push eax
call fcn.0104fee2
add esp, 0x14
xor ebx, ebx
cmp dword [ebp - 0x828], ebx
jbe 0x1051077
cmp dword [ebp - 0x82c], ebx
je 0x1050d63
push dword [ebp - 0x818]
push 0xb000
push dword [ebp - 0x840]
call dword [0x1068e80]
test eax, eax
jne 0x1051077
push dword [ebp - 0x818]
push dword [ebp - 0x81c]
push 0x1019478
jmp 0x1050d8d
push dword [ebp - 0x818]
push 0x1019410
push edi
push eax
call fcn.0104fee2
add esp, 0x10
jmp 0x1051003
mov esi, 0x80004004
push 0x10193c8
push edi
push esi
call fcn.0104fee2
add esp, 0xc
jmp 0x10510b2
cmp dword [ebp - 0x82c], ebx
jne 0x10510b2
cmp dword [ebp - 0x820], ebx
je 0x10510c6
lea eax, [ebp - 0x854]
push eax
push ebx
push dword [ebp - 0x820]
push 0x10503dd
push ebx
push ebx
call dword [sym.imp.KERNEL32.dll_CreateThread]
mov dword [ebp - 0x830], eax
cmp eax, ebx
je 0x10510b2
mov dword [ebp - 0x820], ebx
cmp dword [ebp - 0x820], 0
je 0x10510c6
push dword [ebp - 0x820]
call fcn.0105e0e7
xor edi, edi
cmp dword [ebp - 0x824], edi
je 0x10510db
push dword [ebp - 0x824]
call fcn.0105e0e7
cmp dword [ebp - 0x818], edi
je 0x10510ee
push dword [ebp - 0x818]
call fcn.0105e0e7
cmp dword [ebp - 0x81c], edi
je 0x1051101
push dword [ebp - 0x81c]
call fcn.0105e0e7
cmp esi, edi
jge 0x105113b
push dword [0x1068e7c]
mov dword [0x1068e80], edi
mov dword [0x1068e84], edi
mov dword [0x1068e88], edi
mov dword [0x1068e8c], edi
mov dword [0x1068e90], edi
mov dword [0x1068e94], edi
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
mov dword [0x1068e7c], edi
cmp dword [ebp - 0x830], edi
je 0x105114f
push dword [ebp - 0x830]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov ecx, dword [ebp - 4]
pop edi
mov eax, esi
pop esi
xor ecx, ebp
pop ebx
call fcn.0104f2d3
leave
ret 8