Function at 0x495fa0
Capabilities:
Acquire debug privileges
Get file size

Disassembly:
sub esp, 0x3b0
mov eax, dword [0x52e144]
xor eax, esp
mov dword [esp + 0x3ac], eax
call fcn.00491fb0
test al, al
jne 0x495fd2
mov ecx, dword [esp + 0x3ac]
xor ecx, esp
call fcn.004b6da3
add esp, 0x3b0
ret
push ebx
push esi
xor ebx, ebx
push 0x124
lea eax, [esp + 0x58]
push ebx
push eax
mov dword [esp + 0x1c], ebx
mov dword [esp + 0x5c], ebx
call fcn.004b6dc0
push 0x2c
lea ecx, [esp + 0x34]
push ebx
push ecx
mov dword [esp + 0x38], ebx
call fcn.004b6dc0
push 0x103
lea edx, [esp + 0x1c9]
push ebx
push edx
mov byte [esp + 0x1d0], bl
call fcn.004b6dc0
add esp, 0x24
push ebx
push 2
mov dword [esp + 0x1c], ebx
call dword [0x548d20]
mov esi, eax
mov dword [esp + 0xc], esi
cmp esi, 0xffffffff
jne 0x49604d
pop esi
xor al, al
pop ebx
mov ecx, dword [esp + 0x3ac]
xor ecx, esp
call fcn.004b6da3
add esp, 0x3b0
ret
push edi
push 0x520978
mov dword [esp + 0x58], 0x128
call fcn.00404690
add esp, 4
push eax
mov eax, dword [0x538644]
push eax
call fcn.0040fed0
mov edi, eax
push ebx
push ebx
mov dword [esp + 0x24], edi
call fcn.00415420
add esp, 8
test eax, eax
jne 0x49609b
push 0x51c12c
call fcn.00404690
push eax
push 0x527e20
call fcn.00401350
add esp, 0xc
lea ecx, [esp + 0x54]
push ecx
push esi
call dword [0x548d24]
test eax, eax
je 0x4963cf
push ebp
push 0x520930
mov dword [esp + 0x14], ebx
call fcn.00404690
push eax
push 0x527e20
call fcn.00401350
mov ebp, dword [sym.imp.KERNEL32.dll_GetFileSize]
add esp, 0xc
xor eax, eax
mov cl, byte [esp + eax + 0x7c]
mov byte [esp + eax + 0x2b8], cl
inc eax
cmp cl, bl
jne 0x4960d4
mov edx, dword [esp + 0x60]
push edx
push ebx
push 0x410
call dword [0x5385d8]
mov esi, eax
cmp esi, ebx
je 0x4961ae
lea eax, [esp + 0x18]
push eax
push 0x28
call dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
push eax
call dword [sym.imp.ADVAPI32.dll_OpenProcessToken]
test eax, eax
je 0x4961a7
lea ecx, [esp + 0x1c]
push ecx
push esi
call dword [0x5385f8]
test eax, eax
je 0x49614d
cmp dword [esp + 0x1c], ebx
je 0x49614d
push 0x520920
call fcn.00404690
add esp, 4
push eax
lea edx, [esp + 0x2bc]
push edx
call dword [sym.imp.KERNEL32.dll_lstrcatA]
mov eax, dword [esp + 0x18]
push 1
push str.SeDebugPrivilege
push eax
call fcn.00494aa0
add esp, 0xc
mov dword [esp + 0x24], 0x104
cmp edi, ebx
je 0x496198
lea ecx, [esp + 0x24]
push ecx
lea edx, [esp + 0x1b8]
push edx
push ebx
push esi
call edi
test eax, eax
jne 0x496198
push 0x104
lea eax, [esp + 0x1b8]
push ebx
push eax
call fcn.004b6dc0
add esp, 0xc
mov eax, dword [esp + 0x18]
cmp eax, ebx
je 0x4961a7
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
cmp dword [0x537f0c], ebx
je 0x496255
lea ecx, [esp + 0x180]
push ecx
lea edx, [esp + 0x1b8]
push edx
call fcn.004145a0
add esp, 8
test eax, eax
je 0x4961e3
mov eax, 0x20
mov word [esp + 0x180], ax
push ebx
push ebx
push 3
push ebx
push ebx
push ebx
lea ecx, [esp + 0x1cc]
push ecx
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov esi, eax
cmp esi, 0xffffffff
je 0x496211
push ebx
push esi
call ebp
push esi
mov edi, eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
cmp edi, 0xffffffff
jne 0x496213
xor edi, edi
mov ecx, dword [esp + 0x60]
lea edx, [esp + 0x1b4]
push edx
lea eax, [esp + 0x184]
push eax
push edi
push ecx
lea edx, [esp + 0x2c8]
push edx
push 0x5208f8
call fcn.00404690
add esp, 4
push eax
push 0x527e20
call fcn.00401350
mov edi, dword [esp + 0x3c]
add esp, 0x1c
jmp 0x4962da
lea eax, [esp + 0x28]
push eax
lea ecx, [esp + 0x1b8]
push ecx
call fcn.00404cd0
test eax, eax
je 0x4962a8
mov edx, dword [esp + 0x40]
mov eax, dword [esp + 0x74]
mov ecx, dword [esp + 0x6c]
push edx
mov edx, dword [esp + 0x64]
push eax
push ecx
push edx
lea eax, [esp + 0x2c8]
push eax
push 0x5208cc
call fcn.00404690
add esp, 4
push eax
push 0x527e20
call fcn.00401350
add esp, 0x1c
mov dword [esp + 0x40], ebx
jmp 0x4962da
mov ecx, dword [esp + 0x74]
mov edx, dword [esp + 0x6c]
mov eax, dword [esp + 0x60]
push ecx
push edx
push eax
lea ecx, [esp + 0x88]
push ecx
push 0x5208a8
call fcn.00404690
add esp, 4
push eax
push 0x527e20
call fcn.00401350
add esp, 0x18
push 0x520894
call fcn.00404690
push eax
lea edx, [esp + 0x84]
push edx
call fcn.004bab59
add esp, 0xc
test eax, eax
jne 0x496302
mov eax, dword [esp + 0x60]
mov dword [0x537cc0], eax
push 0x52087c
call fcn.00404690
push eax
lea ecx, [esp + 0x84]
push ecx
call fcn.004bab59
add esp, 0xc
test eax, eax
jne 0x496328
mov byte [0x53cee5], 1
cmp byte [0x54a134], bl
je 0x49636c
cmp dword [0x54a138], 0x4e48
jb 0x49636c
cmp dword [0x53cfc0], ebx
jne 0x49636c
push 0x52086c
call fcn.00404690
push eax
lea edx, [esp + 0x84]
push edx
call fcn.004bab59
add esp, 0xc
test eax, eax
jne 0x49636c
mov eax, dword [esp + 0x60]
mov dword [0x53cfc0], eax
mov edx, dword [esp + 0x14]
inc dword [esp + 0x10]
lea ecx, [esp + 0x58]
push ecx
push edx
call dword [0x548d28]
test eax, eax
jne 0x4960d2
mov esi, dword [esp + 0x10]
push esi
push 0x520854
call fcn.00404690
add esp, 4
push eax
push 0x527e20
call fcn.00401350
add esp, 0xc
pop ebp
cmp byte [0x549b0c], bl
jne 0x4963cb
cmp dword [esp + 0x5c], 0x64
mov byte [0x549b0c], 1
ja 0x4963cb
cmp esi, 3
ja 0x4963cb
mov byte [0x537e67], 1
mov esi, dword [esp + 0x10]
pop edi
cmp esi, ebx
je 0x4963db
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push ebx
push 1
call fcn.00415420
add esp, 8
test eax, eax
jne 0x496402
push 0x51c12c
call fcn.00404690
push eax
push 0x527e20
call fcn.00401350
add esp, 0xc
mov ecx, dword [esp + 0x3b4]
pop esi
pop ebx
xor ecx, esp
mov al, 1
call fcn.004b6da3
add esp, 0x3b0
ret