Function at 0x401ae0
Capabilities:
Check if file exists
Get common file path
Get file attributes
Get system information on windows
Read .ini file

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
push 0xffffffffffffffff
push 0x40af4c
mov eax, dword fs:[0]
push eax
sub esp, 0xd50
mov eax, dword [0x40f01c]
xor eax, esp
mov dword [esp + 0xd48], eax
push ebx
push esi
push edi
mov eax, dword [0x40f01c]
xor eax, esp
push eax
lea eax, [esp + 0xd60]
mov dword fs:[0], eax
mov eax, dword [ebp + 8]
push 0x206
xor ebx, ebx
lea edx, [esp + 0x142]
xor ecx, ecx
push ebx
push edx
mov dword [esp + 0x38], eax
mov word [esp + 0x148], cx
call fcn.00407f30
add esp, 0xc
push ebx
push 0x1a
lea eax, [esp + 0x144]
push eax
push ebx
call dword [sym.imp.SHELL32.dll_SHGetSpecialFolderPathW]
mov ecx, 0x104
lea eax, [esp + 0x13c]
cmp word [eax], bx
je 0x401b74
add eax, 2
dec ecx
jne 0x401b67
jmp 0x401b97
cmp ecx, ebx
je 0x401b97
mov edx, 0x104
sub edx, ecx
mov eax, 0x104
sub eax, edx
lea ecx, [esp + edx*2 + 0x13c]
mov edx, 0x40d110
call fcn.00401060
lea ecx, [esp + 0x13c]
push ecx
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
je 0x402a07
push 0x208
lea eax, [esp + 0x34a]
xor edx, edx
push ebx
push eax
mov word [esp + 0x350], dx
call fcn.00407f30
add esp, 0xc
push 0x7fe
lea edx, [esp + 0x55a]
xor ecx, ecx
push ebx
push edx
mov word [esp + 0x560], cx
call fcn.00407f30
add esp, 0xc
lea eax, [esp + 0x30]
push eax
call dword [sym.imp.KERNEL32.dll_GetNativeSystemInfo]
mov ax, word [esp + 0x30]
cmp ax, 9
je 0x401d08
cmp ax, 6
je 0x401d08
mov edi, 7
xor ecx, ecx
lea eax, [esp + 0x13c]
mov byte [esp + 0x17], bl
mov dword [esp + 0x68], edi
mov dword [esp + 0x64], ebx
mov word [esp + 0x54], cx
lea edx, [eax + 2]
mov cx, word [eax]
add eax, 2
cmp cx, bx
jne 0x401c34
sub eax, edx
sar eax, 1
push eax
lea eax, [esp + 0x140]
lea esi, [esp + 0x58]
call fcn.00403ac0
mov edx, esi
push edx
mov eax, str.Titan.ini
lea ecx, [esp + 0x7c]
mov dword [esp + 0xd6c], edi
call fcn.00403fe0
add esp, 4
cmp dword [eax + 0x14], 8
jb 0x401c77
mov eax, dword [eax]
push eax
push 0x104
lea eax, [esp + 0x34c]
push eax
push str.Titan.dll
push str.shell_ver
push str.titan
call dword [sym.imp.KERNEL32.dll_GetPrivateProfileStringW]
mov esi, 8
cmp dword [esp + 0x8c], esi
jb 0x401cb5
mov ecx, dword [esp + 0x78]
push ecx
call fcn.004049bc
add esp, 4
xor edx, edx
mov dword [esp + 0xd68], 0xffffffff
mov dword [esp + 0x8c], edi
mov dword [esp + 0x88], ebx
mov word [esp + 0x78], dx
cmp dword [esp + 0x68], esi
jb 0x401ce8
mov eax, dword [esp + 0x54]
push eax
call fcn.004049bc
add esp, 4
mov edx, 0x104
lea eax, [esp + 0x13c]
cmp word [eax], bx
je 0x40203e
add eax, 2
dec edx
jne 0x401cf4
jmp 0x402061
mov edi, 7
xor ecx, ecx
lea eax, [esp + 0x13c]
mov byte [esp + 0x17], 1
mov dword [esp + 0x68], edi
mov dword [esp + 0x64], ebx
mov word [esp + 0x54], cx
lea edx, [eax + 2]
jmp 0x401d30
mov cx, word [eax]
add eax, 2
cmp cx, bx
jne 0x401d30
sub eax, edx
sar eax, 1
push eax
lea eax, [esp + 0x140]
lea esi, [esp + 0x58]
call fcn.00403ac0
mov edx, esi
push edx
mov eax, str.Titan.ini
lea ecx, [esp + 0x7c]
mov dword [esp + 0xd6c], ebx
call fcn.00403fe0
add esp, 4
cmp dword [eax + 0x14], 8
jb 0x401d73
mov eax, dword [eax]
push eax
push 0x104
lea eax, [esp + 0x34c]
push eax
push str.Titan64.dll
push str.shell_ver
push str.titan
call dword [sym.imp.KERNEL32.dll_GetPrivateProfileStringW]
mov esi, 8
cmp dword [esp + 0x8c], esi
jb 0x401db1
mov ecx, dword [esp + 0x78]
push ecx
call fcn.004049bc
add esp, 4
xor edx, edx
mov dword [esp + 0xd68], 0xffffffff
mov dword [esp + 0x8c], edi
mov dword [esp + 0x88], ebx
mov word [esp + 0x78], dx
cmp dword [esp + 0x68], esi
jb 0x401de4
mov eax, dword [esp + 0x54]
push eax
call fcn.004049bc
add esp, 4
mov edx, 0x104
lea eax, [esp + 0x13c]
cmp word [eax], bx
je 0x401dfd
add eax, 2
dec edx
jne 0x401df0
jmp 0x401e20
cmp edx, ebx
je 0x401e20
mov ecx, 0x104
sub ecx, edx
mov eax, 0x104
sub eax, ecx
lea ecx, [esp + ecx*2 + 0x13c]
mov edx, 0x40d10c
call fcn.00401060
xor ecx, ecx
lea eax, [esp + 0x344]
mov dword [esp + 0x8c], edi
mov dword [esp + 0x88], ebx
mov word [esp + 0x78], cx
lea edx, [eax + 2]
nop
mov cx, word [eax]
add eax, 2
cmp cx, bx
jne 0x401e40
sub eax, edx
sar eax, 1
push eax
lea eax, [esp + 0x348]
lea esi, [esp + 0x7c]
call fcn.00403ac0
mov dword [esp + 0xd68], 1
xor edx, edx
lea eax, [esp + 0x13c]
mov word [esp + 0x94], dx
mov dword [esp + 0xa8], edi
mov dword [esp + 0xa4], ebx
lea edx, [eax + 2]
lea ecx, [ecx]
mov cx, word [eax]
add eax, 2
cmp cx, bx
jne 0x401e90
sub eax, edx
sar eax, 1
push eax
lea eax, [esp + 0x140]
lea esi, [esp + 0x98]
call fcn.00403ac0
lea eax, [esp + 0xb0]
push eax
lea eax, [esp + 0x7c]
mov ecx, esi
mov byte [esp + 0xd6c], 2
call fcn.00404030
add esp, 4
cmp dword [esp + 0xa8], 8
jb 0x401eeb
mov ecx, dword [esp + 0x94]
push ecx
call fcn.004049bc
add esp, 4
xor edx, edx
mov dword [esp + 0xa8], edi
mov dword [esp + 0xa4], ebx
mov word [esp + 0x94], dx
mov esi, 8
mov byte [esp + 0xd68], 5
cmp dword [esp + 0x8c], esi
jb 0x401f26
mov eax, dword [esp + 0x78]
push eax
call fcn.004049bc
add esp, 4
xor ecx, ecx
push ebx
lea eax, [esp + 0xb4]
mov word [esp + 0x7c], cx
xor edx, edx
push eax
or eax, 0xffffffff
lea ecx, [esp + 0x5c]
mov dword [esp + 0x94], edi
mov dword [esp + 0x90], ebx
mov dword [esp + 0x70], edi
mov dword [esp + 0x6c], ebx
mov word [esp + 0x5c], dx
call fcn.00403810
mov eax, dword [esp + 0x54]
cmp dword [esp + 0x68], esi
jae 0x401f6d
lea eax, [esp + 0x54]
push eax
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
je 0x401f82
mov byte [esp + 0x16], 1
test al, 0x10
je 0x401f87
mov byte [esp + 0x16], 0
cmp dword [esp + 0x68], esi
jb 0x401f9a
mov ecx, dword [esp + 0x54]
push ecx
call fcn.004049bc
add esp, 4
cmp byte [esp + 0x16], 0
je 0x4022a3
mov eax, dword [esp + 0xb0]
cmp dword [esp + 0xc4], esi
jae 0x401fbc
lea eax, [esp + 0xb0]
push eax
lea edx, [esp + 0x558]
push str.regsvr32.exe__s___u___s_
push edx
call dword [sym.imp.USER32.dll_wsprintfW]
sub esp, 0x10
mov esi, esp
xor eax, eax
mov dword [esi + 0x14], edi
mov dword [esi + 0x10], ebx
mov dword [esp + 0x44], esp
mov word [esi], ax
push ebx
mov eax, 0x40d0f0
call fcn.00403ac0
sub esp, 0x1c
mov byte [esp + 0xda0], 6
mov esi, esp
xor ecx, ecx
lea eax, [esp + 0x58c]
mov dword [esi + 0x14], edi
mov dword [esi + 0x10], ebx
mov dword [esp + 0x50], esp
mov word [esi], cx
lea edx, [eax + 2]
mov cx, word [eax]
add eax, 2
cmp cx, bx
jne 0x402015
sub eax, edx
sar eax, 1
push eax
lea eax, [esp + 0x590]
call fcn.00403ac0
mov byte [esp + 0xda0], 5
jmp 0x402279
cmp edx, ebx
je 0x402061
mov ecx, 0x104
sub ecx, edx
mov eax, 0x104
sub eax, ecx
lea ecx, [esp + ecx*2 + 0x13c]
mov edx, 0x40d10c
call fcn.00401060
xor ecx, ecx
lea eax, [esp + 0x344]
mov dword [esp + 0xa8], edi
mov dword [esp + 0xa4], ebx
mov word [esp + 0x94], cx
lea edx, [eax + 2]
mov cx, word [eax]
add eax, 2
cmp cx, bx
jne 0x402083
sub eax, edx
sar eax, 1
push eax
lea eax, [esp + 0x348]
lea esi, [esp + 0x98]
call fcn.00403ac0
mov dword [esp + 0xd68], 8
xor edx, edx
lea eax, [esp + 0x13c]
mov word [esp + 0x78], dx
mov dword [esp + 0x8c], edi
mov dword [esp + 0x88], ebx
lea edx, [eax + 2]
mov cx, word [eax]
add eax, 2
cmp cx, bx
jne 0x4020d0
sub eax, edx
sar eax, 1
push eax
lea eax, [esp + 0x140]
lea esi, [esp + 0x7c]
call fcn.00403ac0
lea eax, [esp + 0xb0]
push eax
lea eax, [esp + 0x98]
mov ecx, esi
mov byte [esp + 0xd6c], 9
call fcn.00404030
add esp, 4
cmp dword [esp + 0x8c], 8
jb 0x402128
mov ecx, dword [esp + 0x78]
push ecx
call fcn.004049bc
add esp, 4
xor edx, edx
mov dword [esp + 0x8c], edi
mov dword [esp + 0x88], ebx
mov word [esp + 0x78], dx
mov esi, 8
mov byte [esp + 0xd68], 0xc
cmp dword [esp + 0xa8], esi
jb 0x402163
mov eax, dword [esp + 0x94]
push eax
call fcn.004049bc
add esp, 4
xor ecx, ecx
push ebx
lea eax, [esp + 0xb4]
mov word [esp + 0x98], cx
xor edx, edx
push eax
or eax, 0xffffffff
lea ecx, [esp + 0x5c]
mov dword [esp + 0xb0], edi
mov dword [esp + 0xac], ebx
mov dword [esp + 0x70], edi
mov dword [esp + 0x6c], ebx
mov word [esp + 0x5c], dx
call fcn.00403810
mov eax, dword [esp + 0x54]
cmp dword [esp + 0x68], esi
jae 0x4021ad
lea eax, [esp + 0x54]
push eax
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
je 0x4021c2
mov byte [esp + 0x16], 1
test al, 0x10
je 0x4021c7
mov byte [esp + 0x16], 0
cmp dword [esp + 0x68], esi
jb 0x4021da
mov ecx, dword [esp + 0x54]
push ecx
call fcn.004049bc
add esp, 4
cmp byte [esp + 0x16], 0
je 0x4022a3
mov eax, dword [esp + 0xb0]
cmp dword [esp + 0xc4], esi
jae 0x4021fc
lea eax, [esp + 0xb0]
push eax
lea edx, [esp + 0x558]
push str.regsvr32.exe__s__u___s_
push edx
call dword [sym.imp.USER32.dll_wsprintfW]
sub esp, 0x10
mov esi, esp
xor eax, eax
mov dword [esi + 0x14], edi
mov dword [esi + 0x10], ebx
mov dword [esp + 0x34], esp
mov word [esi], ax
push ebx
mov eax, 0x40d0f0
call fcn.00403ac0
sub esp, 0x1c
mov byte [esp + 0xda0], 0xd
mov esi, esp
xor ecx, ecx
lea eax, [esp + 0x58c]
mov dword [esi + 0x14], edi
mov dword [esi + 0x10], ebx
mov dword [esp + 0x60], esp
mov word [esi], cx
lea edx, [eax + 2]
mov cx, word [eax]
add eax, 2
cmp cx, bx
jne 0x402255
sub eax, edx
sar eax, 1
push eax
lea eax, [esp + 0x590]
call fcn.00403ac0
mov byte [esp + 0xda0], 0xc
call fcn.004017d0
sub esp, 0x1c
mov eax, esp
mov dword [eax + 0x14], edi
xor edx, edx
mov dword [eax + 0x10], ebx
lea esi, [esp + 0xcc]
mov dword [esp + 0x34], esp
mov word [eax], dx
call fcn.004011e0
mov esi, 8
mov dword [esp + 0xd68], 0xffffffff
cmp dword [esp + 0xc4], esi
jb 0x4022c7
mov eax, dword [esp + 0xb0]
push eax
call fcn.004049bc
add esp, 4
xor ecx, ecx
push 0x13
mov eax, str.TitanDownloader.exe
lea esi, [esp + 0x124]
mov dword [esp + 0x138], edi
mov dword [esp + 0x134], ebx
mov word [esp + 0x124], cx
call fcn.00403ac0
mov dword [esp + 0xd68], 0xe
cmp dword [esp + 0x134], 8
mov eax, dword [esp + 0x120]
jae 0x402310
mov eax, esi
sub esp, 0x1c
mov esi, esp
mov dword [esi + 0x14], edi
xor edx, edx
mov ecx, eax
mov dword [esi + 0x10], ebx
mov dword [esp + 0x34], esp
mov word [esi], dx
lea edi, [ecx + 2]
lea esp, [esp]
mov dx, word [ecx]
add ecx, 2
cmp dx, bx
jne 0x402330
sub ecx, edi
sar ecx, 1
push ecx
call fcn.00403ac0
call fcn.00401960
cmp byte [esp + 0x17], 0
je 0x4024c7
xor edi, edi
xor eax, eax
mov word [esp + 0x78], ax
lea eax, [esp + 0x13c]
mov dword [esp + 0x8c], 7
mov dword [esp + 0x88], edi
lea edx, [eax + 2]
lea ebx, [ebx]
mov cx, word [eax]
add eax, 2
cmp cx, di
jne 0x402380
sub eax, edx
sar eax, 1
push eax
lea eax, [esp + 0x140]
lea esi, [esp + 0x7c]
call fcn.00403ac0
mov ecx, esi
push ecx
mov eax, str.TitanCore64.dll
lea ecx, [esp + 0xb4]
mov byte [esp + 0xd6c], 0xf
call fcn.00403fe0
add esp, 4
mov ebx, 8
mov byte [esp + 0xd68], 0x11
cmp dword [esp + 0x8c], ebx
jb 0x4023e2
mov edx, dword [esp + 0x78]
push edx
call fcn.004049bc
add esp, 4
xor eax, eax
mov ecx, 7
mov word [esp + 0x78], ax
mov eax, dword [esp + 0xb0]
mov dword [esp + 0x8c], ecx
mov dword [esp + 0x88], edi
cmp dword [esp + 0xc4], ebx
jae 0x402413
lea eax, [esp + 0xb0]
mov dword [esp + 0x68], ecx
xor ecx, ecx
mov word [esp + 0x54], cx
mov ecx, eax
mov dword [esp + 0x64], edi
lea esi, [ecx + 2]
mov dx, word [ecx]
add ecx, 2
cmp dx, di
jne 0x402427
sub ecx, esi
sar ecx, 1
push ecx
lea esi, [esp + 0x58]
call fcn.00403ac0
mov eax, dword [esp + 0x54]
cmp dword [esp + 0x68], ebx
jae 0x40244c
mov eax, esi
push eax
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
je 0x402460
test al, 0x10
jne 0x402460
mov bl, 1
jmp 0x402462
xor bl, bl
mov edi, 8
cmp dword [esp + 0x68], edi
jb 0x40247a
mov edx, dword [esp + 0x54]
push edx
call fcn.004049bc
add esp, 4
test bl, bl
je 0x4024a6
sub esp, 0x1c
mov eax, esp
xor ecx, ecx
mov dword [eax + 0x14], 7
mov dword [eax + 0x10], 0
lea esi, [esp + 0xcc]
mov dword [esp + 0x34], esp
mov word [eax], cx
call fcn.004011e0
mov byte [esp + 0xd68], 0xe
cmp dword [esp + 0xc4], edi
jb 0x4024c7
mov edx, dword [esp + 0xb0]
push edx
call fcn.004049bc
add esp, 4
xor edi, edi
xor eax, eax
mov word [esp + 0x78], ax
lea eax, [esp + 0x13c]
mov dword [esp + 0x8c], 7
mov dword [esp + 0x88], edi
lea edx, [eax + 2]
lea esp, [esp]
mov cx, word [eax]
add eax, 2
cmp cx, di
jne 0x4024f0
sub eax, edx
sar eax, 1
push eax
lea eax, [esp + 0x140]
lea esi, [esp + 0x7c]
call fcn.00403ac0
mov ecx, esi
push ecx
mov eax, str.TitanCore.dll
lea ecx, [esp + 0x108]
mov byte [esp + 0xd6c], 0x12
call fcn.00403fe0
add esp, 4
mov ebx, 8
mov byte [esp + 0xd68], 0x14
cmp dword [esp + 0x8c], ebx
jb 0x402552
mov edx, dword [esp + 0x78]
push edx
call fcn.004049bc
add esp, 4
xor eax, eax
mov ecx, 7
mov word [esp + 0x78], ax
mov eax, dword [esp + 0x104]
mov dword [esp + 0x8c], ecx
mov dword [esp + 0x88], edi
cmp dword [esp + 0x118], ebx
jae 0x402583
lea eax, [esp + 0x104]
mov dword [esp + 0x68], ecx
xor ecx, ecx
mov word [esp + 0x54], cx
mov ecx, eax
mov dword [esp + 0x64], edi
lea esi, [ecx + 2]
mov dx, word [ecx]
add ecx, 2
cmp dx, di
jne 0x402597
sub ecx, esi
sar ecx, 1
push ecx
lea esi, [esp + 0x58]
call fcn.00403ac0
mov eax, dword [esp + 0x54]
cmp dword [esp + 0x68], ebx
jae 0x4025bc
mov eax, esi
push eax
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
je 0x4025d0
test al, 0x10
jne 0x4025d0
mov bl, 1
jmp 0x4025d2
xor bl, bl
cmp dword [esp + 0x68], 8
jb 0x4025e6
mov edx, dword [esp + 0x54]
push edx
call fcn.004049bc
add esp, 4
mov edi, 7
test bl, bl
je 0x402613
sub esp, 0x1c
mov eax, esp
xor ebx, ebx
xor ecx, ecx
mov dword [eax + 0x14], edi
mov dword [eax + 0x10], ebx
lea esi, [esp + 0x120]
mov dword [esp + 0x34], esp
mov word [eax], cx
call fcn.004011e0
jmp 0x402615
xor ebx, ebx
xor edx, edx
lea eax, [esp + 0x13c]
mov word [esp + 0x94], dx
mov dword [esp + 0xa8], edi
mov dword [esp + 0xa4], ebx
lea edx, [eax + 2]
mov cx, word [eax]
add eax, 2
cmp cx, bx
jne 0x402637
sub eax, edx
sar eax, 1
push eax
lea eax, [esp + 0x140]
lea esi, [esp + 0x98]
call fcn.00403ac0
mov eax, esi
push eax
mov eax, str.TitanDownloader.exe
lea ecx, [esp + 0xec]
mov byte [esp + 0xd6c], 0x15
call fcn.00403fe0
add esp, 4
mov esi, 8
mov byte [esp + 0xd68], 0x17
cmp dword [esp + 0xa8], esi
jb 0x40269f
mov ecx, dword [esp + 0x94]
push ecx
call fcn.004049bc
add esp, 4
mov eax, dword [esp + 0xe8]
xor edx, edx
mov dword [esp + 0xa8], edi
mov dword [esp + 0xa4], ebx
mov word [esp + 0x94], dx
cmp dword [esp + 0xfc], esi
jae 0x4026ce
lea eax, [esp + 0xe8]
xor ecx, ecx
mov word [esp + 0x54], cx
mov ecx, eax
mov dword [esp + 0x68], edi
mov dword [esp + 0x64], ebx
lea esi, [ecx + 2]
mov dx, word [ecx]
add ecx, 2
cmp dx, bx
jne 0x4026e2
sub ecx, esi
sar ecx, 1
push ecx
lea esi, [esp + 0x58]
call fcn.00403ac0
cmp dword [esp + 0x68], 8
mov eax, dword [esp + 0x54]
jae 0x402708
mov eax, esi
push eax
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
je 0x40271c
test al, 0x10
jne 0x40271c
mov bl, 1
jmp 0x40271e
xor bl, bl
cmp dword [esp + 0x68], 8
jb 0x402732
mov edx, dword [esp + 0x54]
push edx
call fcn.004049bc
add esp, 4
mov edi, 7
test bl, bl
je 0x40275f
sub esp, 0x1c
mov eax, esp
xor ebx, ebx
xor ecx, ecx
mov dword [eax + 0x14], edi
mov dword [eax + 0x10], ebx
lea esi, [esp + 0x104]
mov dword [esp + 0x34], esp
mov word [eax], cx
call fcn.004011e0
jmp 0x402761
xor ebx, ebx
xor edx, edx
lea eax, [esp + 0x13c]
mov word [esp + 0x78], dx
mov dword [esp + 0x8c], edi
mov dword [esp + 0x88], ebx
lea edx, [eax + 2]
mov cx, word [eax]
add eax, 2
cmp cx, bx
jne 0x402780
sub eax, edx
sar eax, 1
push eax
lea eax, [esp + 0x140]
lea esi, [esp + 0x7c]
call fcn.00403ac0
mov eax, esi
push eax
mov eax, 0x40d24c
lea ecx, [esp + 0xd0]
mov byte [esp + 0xd6c], 0x18
call fcn.00403fe0
add esp, 4
mov esi, 8
mov byte [esp + 0xd68], 0x1a
cmp dword [esp + 0x8c], esi
jb 0x4027e2
mov ecx, dword [esp + 0x78]
push ecx
call fcn.004049bc
add esp, 4
mov eax, dword [esp + 0xcc]
xor edx, edx
mov dword [esp + 0x8c], edi
mov dword [esp + 0x88], ebx
mov word [esp + 0x78], dx
cmp dword [esp + 0xe0], esi
jae 0x40280e
lea eax, [esp + 0xcc]
xor ecx, ecx
mov word [esp + 0x54], cx
mov ecx, eax
mov dword [esp + 0x68], edi
mov dword [esp + 0x64], ebx
lea esi, [ecx + 2]
mov dx, word [ecx]
add ecx, 2
cmp dx, bx
jne 0x402822
sub ecx, esi
sar ecx, 1
push ecx
lea esi, [esp + 0x58]
call fcn.00403ac0
cmp dword [esp + 0x68], 8
mov eax, dword [esp + 0x54]
jae 0x402848
mov eax, esi
push eax
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
je 0x40285c
test al, 0x10
jne 0x40285c
mov bl, 1
jmp 0x40285e
xor bl, bl
cmp dword [esp + 0x68], 8
jb 0x402872
mov edx, dword [esp + 0x54]
push edx
call fcn.004049bc
add esp, 4
test bl, bl
je 0x40289e
sub esp, 0x1c
mov eax, esp
xor ecx, ecx
mov dword [eax + 0x14], 7
mov dword [eax + 0x10], 0
lea esi, [esp + 0xe8]
mov dword [esp + 0x34], esp
mov word [eax], cx
call fcn.004011e0
xor ebx, ebx
mov dword [esp + 0x1c], ebx
mov dword [esp + 0x20], ebx
mov dword [esp + 0x24], ebx
lea esi, [esp + 0x1c]
mov byte [esp + 0xd68], 0x1b
call fcn.004043a0
mov edi, esi
call fcn.00404410
mov edi, dword [esp + 0x20]
cmp edi, ebx
je 0x4028d9
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
xor edi, edi
mov dword [esp + 0x20], edi
mov eax, dword [esp + 0x1c]
cmp eax, ebx
je 0x4028f0
push eax
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov dword [esp + 0x1c], ebx
mov dword [esp + 0x24], ebx
sub esp, 0x1c
mov esi, esp
xor edx, edx
mov dword [esi + 0x14], 7
mov dword [esi + 0x10], ebx
lea eax, [esp + 0x158]
mov word [esi], dx
mov dword [esp + 0x34], esp
lea edx, [eax + 2]
mov cx, word [eax]
add eax, 2
cmp cx, bx
jne 0x402912
sub eax, edx
sar eax, 1
push eax
lea eax, [esp + 0x15c]
call fcn.00403ac0
mov ecx, dword [esp + 0x48]
call fcn.00402a30
cmp edi, ebx
je 0x402942
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, dword [esp + 0x1c]
cmp eax, ebx
je 0x402951
push eax
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov esi, 8
cmp dword [esp + 0xe0], esi
jb 0x40296f
mov eax, dword [esp + 0xcc]
push eax
call fcn.004049bc
add esp, 4
xor ecx, ecx
mov edi, 7
mov dword [esp + 0xe0], edi
mov dword [esp + 0xdc], ebx
mov word [esp + 0xcc], cx
cmp dword [esp + 0xfc], esi
jb 0x4029a5
mov edx, dword [esp + 0xe8]
push edx
call fcn.004049bc
add esp, 4
xor eax, eax
mov dword [esp + 0xfc], edi
mov dword [esp + 0xf8], ebx
mov word [esp + 0xe8], ax
cmp dword [esp + 0x118], esi
jb 0x4029d6
mov ecx, dword [esp + 0x104]
push ecx
call fcn.004049bc
add esp, 4
xor edx, edx
mov dword [esp + 0x118], edi
mov dword [esp + 0x114], ebx
mov word [esp + 0x104], dx
cmp dword [esp + 0x134], esi
jb 0x402a07
mov eax, dword [esp + 0x120]
push eax
call fcn.004049bc
add esp, 4
mov ecx, dword [esp + 0xd60]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0xd48]
xor ecx, esp
call fcn.00404872
mov esp, ebp
pop ebp
ret 4