Function at 0x409d80
Capabilities:
Read file via mapping

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x45851a
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x10
push ebx
push edi
mov edi, ecx
mov dword [ebp - 0x10], 0
mov dword [ebp - 4], 0
mov dword [edi + 0x10], 0
mov dword [edi + 8], 0
call fcn.00427f90
push 1
push str.SeCreateGlobalPrivilege
call fcn.0042b300
mov eax, dword [ebp + 8]
add esp, 8
cmp dword [eax - 8], 0
jle 0x409e07
push 0x5c
push eax
call fcn.0043a7c0
add esp, 8
test eax, eax
je 0x409e07
sub eax, dword [ebp + 8]
sar eax, 1
test eax, eax
jle 0x409e07
lea eax, [ebp + 8]
push eax
lea ecx, [ebp - 0x1c]
call fcn.00405440
mov byte [ebp - 4], 1
mov ebx, 1
jmp 0x409e25
lea eax, [ebp + 8]
push eax
push str.Global_
lea eax, [ebp - 0x18]
push eax
call fcn.00409520
mov dword [ebp - 4], 2
mov ebx, 2
push eax
lea ecx, [ebp - 0x14]
mov dword [ebp - 0x10], ebx
call fcn.00405440
mov dword [ebp - 4], 4
or edx, 0xffffffff
test bl, 2
je 0x409e74
and ebx, 0xfffffffd
mov dword [ebp - 0x10], ebx
mov eax, dword [ebp - 0x18]
lea ecx, [eax - 0x20]
cmp ecx, dword [0x476474]
je 0x409e74
lea ecx, [eax - 0x20]
mov eax, edx
lock xadd dword [ecx], eax
dec eax
test eax, eax
jg 0x409e74
mov eax, dword [ebp - 0x18]
add eax, 0xffffffe0
push eax
call fcn.004471aa
add esp, 4
or edx, 0xffffffff
mov byte [ebp - 4], 5
test bl, 1
je 0x409eae
and ebx, 0xfffffffe
mov dword [ebp - 0x10], ebx
mov eax, dword [ebp - 0x1c]
lea ecx, [eax - 0x20]
cmp ecx, dword [0x476474]
je 0x409eae
lea ecx, [eax - 0x20]
mov eax, edx
lock xadd dword [ecx], eax
dec eax
test eax, eax
jg 0x409eae
mov eax, dword [ebp - 0x1c]
add eax, 0xffffffe0
push eax
call fcn.004471aa
add esp, 4
push esi
mov esi, dword [ebp - 0x14]
push esi
push 0x101c0
push 0
mov eax, dword [esi - 8]
push 4
push 0
add eax, eax
push 0xffffffffffffffff
mov dword [esi - 4], eax
call dword [sym.imp.KERNEL32.dll_CreateFileMappingW]
mov ebx, dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [edi], eax
call ebx
cmp dword [edi], 0
je 0x409eeb
cmp eax, 5
je 0x409eeb
mov dword [edi + 8], 1
jmp 0x409f5d
lea eax, [ebp + 8]
push eax
push str.Local_
lea eax, [ebp - 0x1c]
push eax
call fcn.00409520
mov byte [ebp - 4], 6
lea ecx, [ebp - 0x14]
push eax
call fcn.00408f00
mov byte [ebp - 4], 5
mov eax, dword [ebp - 0x1c]
lea ecx, [eax - 0x20]
cmp ecx, dword [0x476474]
je 0x409f3a
lea ecx, [eax - 0x20]
or eax, 0xffffffff
lock xadd dword [ecx], eax
dec eax
test eax, eax
jg 0x409f3a
mov eax, dword [ebp - 0x1c]
add eax, 0xffffffe0
push eax
call fcn.004471aa
add esp, 4
mov esi, dword [ebp - 0x14]
push esi
push 0x101c0
push 0
mov eax, dword [esi - 8]
push 4
push 0
add eax, eax
push 0xffffffffffffffff
mov dword [esi - 4], eax
call dword [sym.imp.KERNEL32.dll_CreateFileMappingW]
mov dword [edi], eax
call ebx
cmp eax, 0xb7
mov ecx, 1
mov ebx, 0
cmovne ebx, ecx
cmp dword [edi], 0
je 0x40a002
test eax, eax
je 0x409f83
cmp eax, 0xb7
jne 0x40a002
mov ecx, dword [ebp + 0xc]
test ecx, ecx
je 0x409f93
xor eax, eax
test ebx, ebx
sete al
mov dword [ecx], eax
mov eax, dword [esi - 8]
push 0
push 0
push 0
push 0
push 4
push 6
add eax, eax
push esi
mov dword [esi - 4], eax
call dword [sym.imp.ADVAPI32.dll_SetNamedSecurityInfoW]
test eax, eax
jne 0x409fb8
call dword [sym.imp.KERNEL32.dll_GetLastError]
push 0
push 0
push 0
push 6
push dword [edi]
call dword [sym.imp.KERNEL32.dll_MapViewOfFile]
mov dword [edi + 4], eax
test eax, eax
jne 0x409fe7
push dword [edi]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov ecx, edi
call fcn.004123a0
mov ebx, eax
neg ebx
sbb ebx, ebx
inc ebx
jmp 0x40a038
test ebx, ebx
je 0x409ffb
push 0x101c0
push 0
push eax
call fcn.004486f0
add esp, 0xc
mov ebx, 1
jmp 0x40a038
add dword [0x47bce8], 0x101c0
push 0x101c0
adc dword [0x47bcec], 0
push 8
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push eax
call dword [sym.imp.KERNEL32.dll_HeapAlloc]
xor ebx, ebx
mov dword [edi + 4], eax
test eax, eax
mov dword [edi + 0x10], 1
setne bl
mov byte [ebp - 4], 0
lea eax, [esi - 0x20]
or edx, 0xffffffff
cmp eax, dword [0x476474]
je 0x40a064
add esi, 0xffffffe0
mov eax, edx
lock xadd dword [esi], eax
dec eax
test eax, eax
jg 0x40a064
push esi
call fcn.004471aa
add esp, 4
or edx, 0xffffffff
mov dword [ebp - 4], 0xffffffff
mov eax, dword [ebp + 8]
pop esi
lea ecx, [eax - 0x20]
cmp ecx, dword [0x476474]
je 0x40a095
add eax, 0xffffffe0
lock xadd dword [eax], edx
dec edx
test edx, edx
jg 0x40a095
mov ecx, dword [ebp + 8]
add ecx, 0xffffffe0
push ecx
call fcn.004471aa
add esp, 4
mov ecx, dword [ebp - 0xc]
mov eax, ebx
pop edi
pop ebx
mov dword fs:[0], ecx
mov esp, ebp
pop ebp
ret 8