Function at 0x404ff0
Capabilities:
Read file via mapping

Disassembly:
push ebp
mov ebp, esp
push 0xfffffffffffffffe
push 0x538f78
push 0x476b80
mov eax, dword fs:[0]
push eax
sub esp, 0x60
mov eax, dword [0x544070]
xor dword [ebp - 8], eax
xor eax, ebp
mov dword [ebp - 0x1c], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0x10]
mov dword fs:[0], eax
mov dword [ebp - 0x18], esp
mov edi, ecx
mov dword [ebp - 0x44], edi
xor eax, eax
mov dword [ebp - 0x30], eax
mov byte [ebp - 0x2c], al
xor esi, esi
mov dword [ebp - 0x38], eax
mov dword [ebp - 0x34], eax
mov dword [ebp - 0x24], eax
mov word [ebp - 0x20], 0x500
lea eax, [ebp - 0x38]
push eax
push esi
push esi
push esi
push esi
push esi
push esi
push 0x220
push 0x20
push 2
lea eax, [ebp - 0x24]
push eax
call dword [sym.imp.ADVAPI32.dll_AllocateAndInitializeSid]
test eax, eax
je 0x4050c9
xorps xmm0, xmm0
movups xmmword [ebp - 0x70], xmm0
movups xmmword [ebp - 0x60], xmm0
mov dword [ebp - 0x70], 0xc0000000
mov dword [ebp - 0x6c], 2
mov dword [ebp - 0x68], esi
mov dword [ebp - 0x5c], esi
mov dword [ebp - 0x58], 5
mov eax, dword [ebp - 0x38]
mov dword [ebp - 0x54], eax
lea eax, [ebp - 0x34]
push eax
push esi
lea eax, [ebp - 0x70]
push eax
push 2
call dword [sym.imp.ADVAPI32.dll_SetEntriesInAclW]
push 0x14
push 0x40
call dword [sym.imp.KERNEL32.dll_LocalAlloc]
mov esi, eax
test esi, esi
je 0x4050c9
push 1
push esi
call dword [sym.imp.ADVAPI32.dll_InitializeSecurityDescriptor]
push 0
push dword [ebp - 0x34]
push 1
push esi
call dword [sym.imp.ADVAPI32.dll_SetSecurityDescriptorDacl]
mov dword [ebp - 0x50], 0xc
mov dword [ebp - 0x4c], esi
mov dword [ebp - 0x48], 0
push str.BD_CST_DBG_INFO_CTRL
push 0x2808
push 0
push 4
lea eax, [ebp - 0x50]
push eax
push 0xffffffffffffffff
call dword [sym.imp.KERNEL32.dll_CreateFileMappingA]
mov dword [edi + 0x10], eax
mov eax, dword [ebp - 0x34]
test eax, eax
je 0x405105
push eax
call dword [sym.imp.KERNEL32.dll_LocalFree]
mov eax, dword [ebp - 0x38]
test eax, eax
je 0x405113
push eax
call dword [sym.imp.ADVAPI32.dll_FreeSid]
test esi, esi
je 0x40511e
push esi
call dword [sym.imp.KERNEL32.dll_LocalFree]
mov eax, dword [edi + 0x10]
test eax, eax
je 0x40513b
push 0
push 0
push 0
push 6
push eax
call dword [sym.imp.KERNEL32.dll_MapViewOfFile]
mov ecx, eax
mov dword [ebp - 0x30], ecx
jmp 0x40513e
mov ecx, dword [ebp - 0x30]
test ecx, ecx
je 0x4051f6
mov dword [ebp - 4], 0
mov dword [edi + 0x14], ecx
mov eax, 1
lock xadd dword [ecx], eax
inc eax
dec eax
mov dword [ebp - 0x40], eax
cmp eax, 0x100
jl 0x40516f
mov eax, dword [edi + 0x14]
lock dec dword [eax]
mov al, 1
jmp 0x4051e9
xor esi, esi
mov dword [ebp - 0x3c], esi
cmp esi, 0x100
jge 0x4051c5
lea eax, [esi*4 + 1]
add eax, esi
lea edx, [ecx + eax*8]
mov dword [edi + 0x18], edx
mov ecx, 1
xor eax, eax
lock cmpxchg dword [edx], ecx
test eax, eax
je 0x4051a0
inc esi
mov ecx, dword [ebp - 0x30]
jmp 0x405171
mov eax, dword [edi + 0x18]
mov dword [eax + 4], 0
push 0x4b1714
push 0x4b1888
push 0x20
mov eax, dword [edi + 0x18]
add eax, 8
push eax
call fcn.00404fd0
add esp, 0x10
cmp dword [ebp - 0x40], 0
jne 0x4051d5
mov eax, dword [edi + 0x14]
mov dword [eax + 4], 0x54534348
mov eax, dword [ebp - 0x2c]
movzx eax, al
cmp esi, 0x100
mov ecx, 1
cmove eax, ecx
mov byte [ebp - 0x25], al
mov dword [ebp - 0x2c], eax
mov dword [ebp - 4], 0xfffffffe
mov eax, dword [ebp - 0x2c]
test al, al
je 0x405225
mov eax, dword [ebp - 0x30]
push eax
call dword [sym.imp.KERNEL32.dll_UnmapViewOfFile]
push dword [edi + 0x10]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov dword [edi + 0x10], 0
mov dword [edi + 0x14], 0
mov dword [edi + 0x18], 0
mov ecx, dword [ebp - 0x10]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x1c]
xor ecx, ebp
call fcn.0045bdad
mov esp, ebp
pop ebp
ret