Function at 0x476060
Capabilities:
Print debug messages
Read file via mapping

Disassembly:
push 0xffffffffffffffff
push 0x4ae131
mov eax, dword fs:[0]
push eax
sub esp, 0x130
push ebx
push ebp
push esi
push edi
mov eax, dword [0x4cc748]
xor eax, esp
push eax
lea eax, [esp + 0x144]
mov dword fs:[0], eax
mov esi, ecx
mov eax, dword [esp + 0x15c]
push eax
xor edi, edi
push edi
push edi
push edi
call dword [sym.imp.KERNEL32.dll_CreateEventA]
cmp eax, edi
mov dword [esi], eax
jne 0x476168
push 1
push 3
lea ecx, [esp + 0x3c]
mov dword [esi + 8], edi
mov dword [esi + 0xc], edi
call fcn.0042bb30
mov dword [esp + 0x14c], edi
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov ecx, dword [esp + 0x154]
push eax
push str._Create_Event_Fail_
push ecx
lea edx, [esp + 0x48]
push edx
call fcn.00424b70
add esp, 8
push eax
call fcn.00424b70
add esp, 8
mov ecx, eax
call fcn.00475f00
lea eax, [esp + 0x18]
push eax
lea ecx, [esp + 0x38]
call fcn.00420270
mov esi, 0x10
cmp dword [eax + 0x18], esi
jb 0x476114
mov eax, dword [eax + 4]
jmp 0x476117
add eax, 4
push eax
call dword [sym.imp.KERNEL32.dll_OutputDebugStringA]
cmp dword [esp + 0x30], esi
jb 0x476131
mov ecx, dword [esp + 0x1c]
push ecx
call fcn.0047b89c
add esp, 4
lea ecx, [esp + 0x88]
mov dword [esp + 0x14c], 0xffffffff
call fcn.00418d90
lea edx, [esp + 0x88]
push edx
mov dword [esp + 0x8c], vtable.std::ios_base.0
call fcn.004a4939
add esp, 4
jmp 0x4763de
push edi
call dword [sym.imp.KERNEL32.dll_SetLastError]
mov ebp, dword [esp + 0x154]
push ebp
push edi
push 0xf001f
call dword [sym.imp.KERNEL32.dll_OpenFileMappingA]
cmp eax, edi
mov dword [esi + 4], eax
mov byte [esp + 0x17], 1
jne 0x4762c2
push 0x14
call fcn.0047ba1f
push 0xc
mov ebx, eax
call fcn.0047ba1f
add esp, 8
test ebx, ebx
mov edi, eax
je 0x4761de
test edi, edi
je 0x4761de
push 1
push ebx
call dword [sym.imp.ADVAPI32.dll_InitializeSecurityDescriptor]
test eax, eax
je 0x4761de
push 0
push 0
push 1
push ebx
call dword [sym.imp.ADVAPI32.dll_SetSecurityDescriptorDacl]
test eax, eax
je 0x4761de
mov dword [edi], 0xc
mov dword [edi + 4], ebx
mov dword [edi + 8], 1
mov ebx, dword [esp + 0x158]
push ebp
push ebx
push 0
push 4
push edi
push 0xffffffffffffffff
call dword [sym.imp.KERNEL32.dll_CreateFileMappingA]
xor ecx, ecx
cmp eax, ecx
mov dword [esi + 4], eax
jne 0x4762ba
push 1
mov dword [esi + 8], ecx
mov dword [esi + 0xc], ecx
push 3
lea ecx, [esp + 0x3c]
call fcn.0042bb30
mov dword [esp + 0x14c], 1
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str._Create_FileMapping_Fail_LastError_
lea eax, [esp + 0x44]
push ebp
push eax
call fcn.00424b70
add esp, 8
push eax
call fcn.00424b70
add esp, 8
mov ecx, eax
call fcn.00475f00
lea ecx, [esp + 0x18]
push ecx
lea ecx, [esp + 0x38]
call fcn.00420270
mov esi, 0x10
cmp dword [eax + 0x18], esi
jb 0x476266
mov eax, dword [eax + 4]
jmp 0x476269
add eax, 4
push eax
call dword [sym.imp.KERNEL32.dll_OutputDebugStringA]
cmp dword [esp + 0x30], esi
jb 0x476283
mov edx, dword [esp + 0x1c]
push edx
call fcn.0047b89c
add esp, 4
lea ecx, [esp + 0x88]
mov dword [esp + 0x14c], 0xffffffff
call fcn.00418d90
lea eax, [esp + 0x88]
push eax
mov dword [esp + 0x8c], vtable.std::ios_base.0
call fcn.004a4939
add esp, 4
jmp 0x4763de
mov byte [esp + 0x17], cl
xor edi, edi
jmp 0x4762c9
mov ebx, dword [esp + 0x158]
mov ecx, dword [esi + 4]
push edi
push edi
push edi
push 6
push ecx
call dword [sym.imp.KERNEL32.dll_MapViewOfFile]
cmp eax, edi
mov dword [esi + 8], eax
jne 0x4763b3
push 1
push 3
lea ecx, [esp + 0xc4]
mov dword [esi + 8], edi
mov dword [esi + 0xc], edi
call fcn.0042bb30
mov dword [esp + 0x14c], 2
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str._Get_FileMapping_Buff_Fail_LastError_
lea edx, [esp + 0xcc]
push ebp
push edx
call fcn.00424b70
add esp, 8
push eax
call fcn.00424b70
add esp, 8
mov ecx, eax
call fcn.00475f00
lea eax, [esp + 0x18]
push eax
lea ecx, [esp + 0xc0]
call fcn.00420270
mov esi, 0x10
cmp dword [eax + 0x18], esi
jb 0x476351
mov eax, dword [eax + 4]
jmp 0x476354
add eax, 4
push eax
call dword [sym.imp.KERNEL32.dll_OutputDebugStringA]
cmp dword [esp + 0x30], esi
jb 0x47636e
mov ecx, dword [esp + 0x1c]
push ecx
call fcn.0047b89c
add esp, 4
lea ecx, [esp + 0x110]
mov dword [esp + 0x30], 0xf
mov dword [esp + 0x2c], edi
mov byte [esp + 0x1c], 0
mov dword [esp + 0x14c], 0xffffffff
call fcn.00418d90
lea edx, [esp + 0x110]
push edx
mov dword [esp + method.std::ios_base.virtual_0], vtable.std::ios_base.0
call fcn.004a4939
add esp, 4
jmp 0x4763de
cmp byte [esp + 0x17], 0
mov dword [esi + 0xc], ebx
jne 0x4763de
push ebx
push edi
push eax
call fcn.0047c790
mov eax, dword [esi + 8]
add esp, 0xc
cmp eax, edi
je 0x4763d5
mov dword [eax], 4
mov eax, dword [esi]
push eax
call dword [sym.imp.KERNEL32.dll_SetEvent]
mov ecx, dword [esp + 0x144]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x13c
ret 0xc