Function at 0x401620
Capabilities:
Acquire debug privileges
Check if file exists
Get file attributes

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x524
mov eax, dword [0x42b0a4]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
push esi
xor ebx, ebx
push edi
mov ecx, 0x42c300
mov dword [ebp - 0x514], ebx
call fcn.00403310
test eax, eax
je 0x40182c
mov eax, dword [0x42cd0c]
cmp eax, 6
je 0x401ad5
cmp eax, 7
je 0x401ad5
cmp eax, 9
jne 0x401a7b
mov ecx, dword [0x42712c]
mov eax, dword [0x427128]
mov edx, dword [0x427130]
push 0x70
mov dword [ebp - 0x304], ecx
mov dword [ebp - 0x308], eax
mov eax, dword [0x427134]
lea ecx, [ebp - 0x2f8]
push ebx
push ecx
mov dword [ebp - 0x300], edx
mov dword [ebp - 0x2fc], eax
call fcn.00414340
mov ecx, dword [0x427140]
mov edx, dword [0x427138]
mov eax, dword [0x42713c]
add esp, 0xc
push 0x6c
mov dword [ebp - 0x280], ecx
mov dword [ebp - 0x288], edx
mov edx, dword [0x427144]
mov dword [ebp - 0x284], eax
mov eax, dword [0x427148]
lea ecx, [ebp - 0x274]
push ebx
push ecx
mov dword [ebp - 0x27c], edx
mov dword [ebp - 0x278], eax
call fcn.00414340
mov eax, dword [0x427150]
mov edx, dword [0x42714c]
mov ecx, dword [0x427154]
add esp, 0xc
push 0x70
mov dword [ebp - 0x204], eax
mov dword [ebp - 0x208], edx
mov edx, dword [0x427158]
lea eax, [ebp - 0x1f8]
push ebx
push eax
mov dword [ebp - 0x200], ecx
mov dword [ebp - 0x1fc], edx
call fcn.00414340
mov edx, dword [0x427160]
mov eax, dword [0x427164]
mov ecx, dword [0x42715c]
add esp, 0xc
push 0x6e
mov dword [ebp - 0x180], eax
mov dword [ebp - 0x188], ecx
mov ecx, dword [0x427168]
mov dword [ebp - 0x184], edx
mov dx, word [0x42716c]
lea eax, [ebp - 0x176]
push ebx
push eax
mov dword [ebp - 0x17c], ecx
mov word [ebp - 0x178], dx
call fcn.00414340
mov ecx, dword [0x427170]
mov edx, dword [0x427174]
mov eax, dword [0x427178]
add esp, 0xc
push 0x72
mov dword [ebp - 0x104], edx
mov dword [ebp - 0x108], ecx
mov cx, word [0x42717c]
lea edx, [ebp - 0xfa]
push ebx
push edx
mov dword [ebp - 0x100], eax
mov word [ebp - 0xfc], cx
call fcn.00414340
mov eax, dword [0x427180]
mov ecx, dword [0x427184]
mov edx, dword [0x427188]
mov dword [ebp - 0x88], eax
mov ax, word [0x42718c]
add esp, 0xc
mov dword [ebp - 0x84], ecx
mov dword [ebp - 0x80], edx
push 0x72
lea ecx, [ebp - 0x7a]
push ebx
push ecx
mov word [ebp - 0x7c], ax
call fcn.00414340
add esp, 0xc
xor esi, esi
lea edi, [ebp - 0x308]
push edi
mov ecx, 0x42c300
call fcn.00403470
test eax, eax
jne 0x401a1e
inc esi
sub edi, 0xffffff80
cmp esi, 6
jl 0x401810
or edx, 0xffffffff
mov dword [0x42c2f0], edx
mov dword [0x44e348], ebx
cmp dword [0x44e1b0], 3
jne 0x401cb1
cmp edx, 5
ja 0x401cab
cmp dword [0x44e348], ebx
jne 0x401cb1
push 0x206
lea ecx, [ebp - 0x50e]
xor eax, eax
push ebx
push ecx
mov dword [ebp - 0x51c], ebx
xor esi, esi
mov word [ebp - 0x510], ax
call fcn.00414340
add esp, 0xc
push 0x104
lea edx, [ebp - 0x210]
push edx
push ebx
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
lea eax, [ebp - 0x210]
push 0x5c
push eax
call fcn.00413011
lea edx, [ebp - 0x210]
xor ecx, ecx
push edx
mov word [eax], cx
lea eax, [ebp - 0x510]
push 0x104
push eax
call fcn.004128e5
lea eax, [ebp - 0x510]
add esp, 0x14
add eax, 0xfffffffe
lea ecx, [ecx]
mov cx, word [eax + 2]
add eax, 2
cmp cx, bx
jne 0x4018d0
mov ecx, dword [str.HGDraw.dll]
mov edx, dword [0x427194]
mov dword [eax], ecx
mov ecx, dword [0x427198]
mov dword [eax + 4], edx
mov edx, dword [0x42719c]
mov dword [eax + 8], ecx
mov ecx, dword [0x4271a0]
mov dword [eax + 0xc], edx
mov edx, dword [0x4271a4]
mov dword [eax + 0x10], ecx
mov dword [eax + 0x14], edx
lea eax, [ebp - 0x510]
push eax
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
jne 0x401964
lea ecx, [ebp - 0x51c]
push ecx
call fcn.00402f30
mov esi, eax
add esp, 4
cmp esi, ebx
je 0x401cb1
mov eax, dword [ebp - 0x51c]
cmp eax, 0xa
jl 0x401cb1
lea edx, [ebp - 0x510]
push edx
mov ecx, esi
call fcn.00404ad0
add esp, 4
test eax, eax
jne 0x401cb1
call dword [sym.imp.KERNEL32.dll_GetCurrentProcessId]
push eax
lea eax, [ebp - 0x510]
push eax
call fcn.00401000
test eax, eax
je 0x401cb1
cmp esi, ebx
je 0x40198c
push esi
call fcn.0041230c
add esp, 4
lea ecx, [ebp - 0x518]
push ecx
push 0x28
mov dword [ebp - 0x518], ebx
call dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
push eax
call dword [sym.imp.ADVAPI32.dll_OpenProcessToken]
test eax, eax
je 0x4019d4
mov edi, dword [ebp - 0x518]
lea edx, [ebp - 0x520]
push edx
push str.SeDebugPrivilege
push ebx
call dword [sym.imp.ADVAPI32.dll_LookupPrivilegeValueW]
test eax, eax
je 0x4019d4
lea esi, [ebp - 0x520]
call fcn.00403810
mov eax, dword [ebp - 0x518]
cmp eax, ebx
je 0x4019e5
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, dword [0x42cd10]
lea ebx, [ebp - 0x510]
call fcn.004036e0
test eax, eax
jne 0x401cb1
mov eax, dword [0x42cd10]
mov dword [0x44e348], eax
mov eax, dword [ebp - 0x514]
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00412317
mov esp, ebp
pop ebp
ret
mov edx, esi
shl edx, 7
lea eax, [ebp + edx - 0x308]
mov edx, 0x44e238
sub edx, eax
movzx ecx, word [eax]
mov word [edx + eax], cx
add eax, 2
cmp cx, bx
jne 0x401a31
mov edx, 9
mov dword [0x42c2f0], edx
xor eax, eax
lea ecx, [ecx]
movzx ecx, word [eax + 0x42cd14]
mov word [eax + 0x44e1b8], cx
add eax, 2
cmp cx, bx
jne 0x401a50
mov dword [0x42c2f4], esi
mov dword [ebp - 0x514], 1
jmp 0x40183b
mov edx, eax
mov dword [0x42c2f0], edx
xor eax, eax
jmp 0x401a90
movzx ecx, word [eax + 0x42cd14]
mov word [eax + 0x44e1b8], cx
add eax, 2
cmp cx, bx
jne 0x401a90
xor eax, eax
jmp 0x401ab0
movzx ecx, word [eax + 0x42cd98]
mov word [eax + 0x44e238], cx
add eax, 2
cmp cx, bx
jne 0x401ab0
mov dword [ebp - 0x514], 1
jmp 0x40183b
mov eax, dword [0x4270d4]
mov ecx, dword [0x4270d8]
mov edx, dword [0x4270dc]
mov dword [ebp - 0x288], eax
movzx eax, word [0x4270e0]
push 0x72
mov dword [ebp - 0x284], ecx
lea ecx, [ebp - 0x27a]
push ebx
push ecx
mov dword [ebp - 0x280], edx
mov word [ebp - 0x27c], ax
call fcn.00414340
mov edx, dword [0x4270e4]
mov eax, dword [0x4270e8]
mov ecx, dword [0x4270ec]
add esp, 0xc
push 0x72
mov dword [ebp - 0x204], eax
mov dword [ebp - 0x208], edx
mov dx, word [0x4270f0]
lea eax, [ebp - 0x1fa]
push ebx
push eax
mov dword [ebp - 0x200], ecx
mov word [ebp - 0x1fc], dx
call fcn.00414340
mov ecx, dword [0x4270f4]
mov edx, dword [0x4270f8]
mov eax, dword [0x4270fc]
add esp, 0xc
push 0x72
mov dword [ebp - 0x184], edx
mov dword [ebp - 0x188], ecx
mov cx, word [0x427100]
lea edx, [ebp - 0x17a]
push ebx
push edx
mov dword [ebp - 0x180], eax
mov word [ebp - 0x17c], cx
call fcn.00414340
mov ecx, dword [0x427108]
mov eax, dword [0x427104]
mov edx, dword [0x42710c]
add esp, 0xc
push 0x70
mov dword [ebp - 0x104], ecx
mov dword [ebp - 0x108], eax
mov eax, dword [0x427110]
lea ecx, [ebp - 0xf8]
push ebx
push ecx
mov dword [ebp - 0x100], edx
mov dword [ebp - 0xfc], eax
call fcn.00414340
mov eax, dword [0x427118]
mov ecx, dword [0x42711c]
mov edx, dword [0x427114]
add esp, 0xc
mov dword [ebp - 0x84], eax
movzx eax, word [0x427124]
push 0x6e
mov dword [ebp - 0x80], ecx
mov dword [ebp - 0x88], edx
mov edx, dword [0x427120]
lea ecx, [ebp - 0x76]
push ebx
push ecx
mov dword [ebp - 0x7c], edx
mov word [ebp - 0x78], ax
call fcn.00414340
add esp, 0xc
xor esi, esi
lea edi, [ebp - 0x288]
lea esp, [esp]
push edi
mov ecx, 0x42c300
call fcn.00403470
test eax, eax
jne 0x401c4d
inc esi
sub edi, 0xffffff80
cmp esi, 5
jl 0x401c30
jmp 0x40182c
mov edx, esi
shl edx, 7
lea eax, [ebp + edx - 0x288]
mov edx, 0x44e238
sub edx, eax
movzx ecx, word [eax]
mov word [edx + eax], cx
add eax, 2
cmp cx, bx
jne 0x401c60
mov edx, 6
mov dword [0x42c2f0], edx
xor eax, eax
lea esp, [esp]
movzx ecx, word [eax + 0x42cd14]
mov word [eax + 0x44e1b8], cx
add eax, 2
cmp cx, bx
jne 0x401c80
mov dword [0x42c2f4], esi
mov dword [ebp - 0x514], 1
jmp 0x40183b
mov dword [0x44e348], ebx
mov ecx, dword [ebp - 4]
mov eax, dword [ebp - 0x514]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.00412317
mov esp, ebp
pop ebp
ret