Function at 0x401000
Capabilities:
Read file via mapping
Terminate process

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x50
mov dword [ebp - 0x14], 0xc
mov dword [ebp - 0xc], 1
lea eax, [ebp - 0x30]
mov dword [ebp - 0x10], eax
push 0x407030
push str.dbmon.txt
call fcn.0040182e
add esp, 8
mov dword [ebp - 8], eax
cmp dword [ebp - 8], 0
jne 0x40104e
push str.unable_to_output_file
push 0x407270
call fcn.00401723
add esp, 8
push 1
call fcn.0040164e
push 1
lea ecx, [ebp - 0x30]
push ecx
call dword [sym.imp.ADVAPI32.dll_InitializeSecurityDescriptor]
test eax, eax
jne 0x40107e
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.unable_to_InitializeSecurityDescriptor__err___d_n
push 0x407270
call fcn.00401723
add esp, 0xc
push 1
call fcn.0040164e
push 0
push 0
push 1
lea edx, [ebp - 0x30]
push edx
call dword [sym.imp.ADVAPI32.dll_SetSecurityDescriptorDacl]
test eax, eax
jne 0x4010b2
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.unable_to_SetSecurityDescriptorDacl__err___d_n
push 0x407270
call fcn.00401723
add esp, 0xc
push 1
call fcn.0040164e
push str.DBWIN_BUFFER_READY
push 0
push 0
lea eax, [ebp - 0x14]
push eax
call dword [sym.imp.KERNEL32.dll_CreateEventA]
mov dword [ebp - 0x40], eax
cmp dword [ebp - 0x40], 0
jne 0x4010ee
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push 0x4070d0
push 0x407270
call fcn.00401723
add esp, 0xc
push 1
call fcn.0040164e
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0xb7
jne 0x401114
push str.dbmon:_already_running_n
push 0x407270
call fcn.00401723
add esp, 8
push 1
call fcn.0040164e
push str.DBWIN_DATA_READY
push 0
push 0
lea ecx, [ebp - 0x14]
push ecx
call dword [sym.imp.KERNEL32.dll_CreateEventA]
mov dword [ebp - 0x48], eax
cmp dword [ebp - 0x48], 0
jne 0x401150
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.dbmon:_Unable_to_create_synchronization_object__err___d_n
push 0x407270
call fcn.00401723
add esp, 0xc
push 1
call fcn.0040164e
push str.DBWIN_BUFFER
push 0x1000
push 0
push 4
lea edx, [ebp - 0x14]
push edx
push 0xffffffffffffffff
call dword [sym.imp.KERNEL32.dll_CreateFileMappingA]
mov dword [ebp - 4], eax
cmp dword [ebp - 4], 0
jne 0x401193
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.dbmon:_Unable_to_create_file_mapping_object__err___d_n
push 0x407270
call fcn.00401723
add esp, 0xc
push 1
call fcn.0040164e
push 0x200
push 0
push 0
push 4
mov eax, dword [ebp - 4]
push eax
call dword [sym.imp.KERNEL32.dll_MapViewOfFile]
mov dword [ebp - 0x1c], eax
cmp dword [ebp - 0x1c], 0
jne 0x4011d1
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.dbmon:_Unable_to_map_shared_memory__err___d_n
push 0x407270
call fcn.00401723
add esp, 0xc
push 1
call fcn.0040164e
mov ecx, dword [ebp - 0x1c]
add ecx, 4
mov dword [ebp - 0x3c], ecx
mov edx, dword [ebp - 0x1c]
mov dword [ebp - 0x18], edx
mov dword [ebp - 0x38], 0xffffffff
mov dword [ebp - 0x44], 1
mov eax, dword [ebp - 0x40]
push eax
call dword [sym.imp.KERNEL32.dll_SetEvent]
push 0xffffffffffffffff
mov ecx, dword [ebp - 0x48]
push ecx
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
mov dword [ebp - 0x34], eax
cmp dword [ebp - 0x34], 0
je 0x40122d
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.dbmon:_wait_failed__err___d_n
push 0x407270
call fcn.00401723
add esp, 0xc
push 1
call fcn.0040164e
mov edx, dword [ebp - 0x18]
mov eax, dword [ebp - 0x38]
cmp eax, dword [edx]
je 0x40129a
mov ecx, dword [ebp - 0x18]
mov edx, dword [ecx]
mov dword [ebp - 0x38], edx
cmp dword [ebp - 0x44], 0
jne 0x40129a
mov eax, dword [0x407254]
sub eax, 1
mov dword [0x407254], eax
cmp dword [0x407254], 0
jl 0x401281
mov ecx, dword [0x407250]
mov byte [ecx], 0xa
mov edx, 0xa
and edx, 0xff
mov dword [ebp - 0x4c], edx
mov eax, dword [0x407250]
add eax, 1
mov dword [0x407250], eax
jmp 0x401293
push 0x407250
push 0xa
call fcn.0040150c
add esp, 8
mov dword [ebp - 0x4c], eax
mov dword [ebp - 0x44], 1
cmp dword [ebp - 0x44], 0
je 0x4012c6
mov ecx, dword [ebp - 0x38]
push ecx
push 0x40720c
mov edx, dword [ebp - 8]
push edx
call fcn.00401723
add esp, 0xc
mov eax, dword [ebp - 0x38]
push eax
push str._3u:
call fcn.004014db
add esp, 8
mov ecx, dword [ebp - 0x3c]
push ecx
push 0x40721c
mov edx, dword [ebp - 8]
push edx
call fcn.00401723
add esp, 0xc
mov eax, dword [ebp - 0x3c]
push eax
push 0x407220
call fcn.004014db
add esp, 8
mov ecx, dword [ebp - 0x3c]
movsx edx, byte [ecx]
test edx, edx
je 0x401318
mov eax, dword [ebp - 0x3c]
push eax
call fcn.00401460
add esp, 4
mov ecx, dword [ebp - 0x3c]
movsx edx, byte [ecx + eax - 1]
cmp edx, 0xa
jne 0x401318
mov dword [ebp - 0x50], 1
jmp 0x40131f
mov dword [ebp - 0x50], 0
mov eax, dword [ebp - 0x50]
mov dword [ebp - 0x44], eax
mov ecx, dword [ebp - 0x40]
push ecx
call dword [sym.imp.KERNEL32.dll_SetEvent]
mov edx, dword [ebp - 8]
push edx
call fcn.00401344
add esp, 4
jmp 0x4011f8