Function at 0x10018310
Capabilities:
Print debug messages
Read file on windows
Write file on windows

Disassembly:
push ebp
mov ebp, esp
push 0xfffffffffffffffe
push 0x100901a8
push 0x1005aa50
mov eax, dword fs:[0]
push eax
sub esp, 0x230
mov eax, dword [0x1009cbc0]
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 dword [ebp - 0x23c], ecx
xor eax, eax
mov word [ebp - 0x224], ax
push 0x206
push eax
lea eax, [ebp - 0x222]
push eax
call fcn.10055aa0
add esp, 0xc
mov dword [ebp - 0x240], 0xffffffff
mov dword [ebp - 0x234], 0
mov dword [ebp - 0x238], 0x140007
mov dword [ebp - 4], 0
mov dword [ebp - 4], 1
mov ebx, dword [sym.imp.KERNEL32.dll_GetLastError]
call ebx
lea esi, [eax + 0x1e]
mov dword [ebp - 0x228], esi
mov dword [ebp - 0x230], 0
push 0x1000a
call fcn.1005218a
mov dword [ebp - 0x22c], eax
push 0x2000a
call fcn.1005218a
add esp, 8
mov edi, eax
cmp dword [ebp - 0x22c], 0
je 0x10018489
test edi, edi
je 0x10018489
push 0x1008aacc
push 0xffff
push edi
call fcn.1005211a
add esp, 0xc
test eax, eax
jle 0x10018474
xor eax, eax
mov word [edi + 0x1fffe], ax
push 0xffffffffffffffff
push edi
mov ecx, edi
call fcn.10001b80
inc eax
push eax
push dword [ebp - 0x22c]
lea eax, [ebp - 0x230]
push eax
call fcn.10052d14
add esp, 0x14
test eax, eax
je 0x10018447
push esi
push edi
push str.wcstombs_s_error_in_log_file:__s____d_n
call fcn.10052604
add esp, 0xc
push edi
mov esi, dword [sym.imp.KERNEL32.dll_OutputDebugStringW]
call esi
jmp 0x1001844d
mov esi, dword [sym.imp.KERNEL32.dll_OutputDebugStringW]
push dword [ebp - 0x228]
push dword [ebp - 0x22c]
push str.LoadApplicationConfig
push 4
mov edx, 0x99
mov ecx, str...StandAloneSvcAppFiles.cpp
call fcn.10001cf0
add esp, 0x10
jmp 0x100184a3
push esi
push str.Error__d_in_swprintf_s_n
call fcn.10052604
add esp, 8
push str.Error_in_swprintf_s_n
jmp 0x1001849b
push str.Memory_allocation_error_in_log_file_n
call fcn.10052604
add esp, 4
push str.Memory_allocation_error_in_log_file_n
mov esi, dword [sym.imp.KERNEL32.dll_OutputDebugStringW]
call esi
mov eax, dword [ebp - 0x22c]
test eax, eax
je 0x100184b6
push eax
call fcn.10052152
add esp, 4
test edi, edi
je 0x100184c3
push edi
call fcn.10052152
add esp, 4
push str.mbae_config.dat
push 0x100e1fb0
push 0x10086350
lea eax, [ebp - 0x224]
push eax
call fcn.10004ed0
add esp, 0x10
push 0
push 0x80
push 3
push 0
push 0
push 0xc0000000
lea eax, [ebp - 0x224]
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov edi, eax
mov dword [ebp - 0x240], edi
cmp edi, 0xffffffff
je 0x100186d1
push 0
lea eax, [ebp - 0x234]
push eax
push 4
lea eax, [ebp - 0x238]
push eax
push edi
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x100187e7
cmp dword [ebp - 0x234], 4
jne 0x100187e7
cmp dword [ebp - 0x238], 0x140007
je 0x10018741
call ebx
add eax, 0x1e
mov dword [ebp - 0x230], eax
mov dword [ebp - 0x228], 0
push 0x1000a
call fcn.1005218a
mov dword [ebp - 0x22c], eax
push 0x2000a
call fcn.1005218a
add esp, 8
mov ebx, eax
cmp dword [ebp - 0x22c], 0
je 0x1001863b
test ebx, ebx
je 0x1001863b
push dword [ebp - 0x238]
push str.MBAERT_INCOMPATIBLE_VERSION:__d
push 0xffff
push ebx
call fcn.1005211a
add esp, 0x10
test eax, eax
jle 0x10018621
xor eax, eax
mov word [ebx + 0x1fffe], ax
push 0xffffffffffffffff
push ebx
mov ecx, ebx
call fcn.10001b80
inc eax
push eax
push dword [ebp - 0x22c]
lea eax, [ebp - 0x228]
push eax
call fcn.10052d14
add esp, 0x14
test eax, eax
je 0x100185fa
push dword [ebp - 0x230]
push ebx
push str.wcstombs_s_error_in_log_file:__s____d_n
call fcn.10052604
add esp, 0xc
push ebx
call esi
push dword [ebp - 0x230]
push dword [ebp - 0x22c]
push str.LoadApplicationConfig
push 4
mov edx, 0xb8
mov ecx, str...StandAloneSvcAppFiles.cpp
call fcn.10001cf0
add esp, 0x10
jmp 0x1001864f
push dword [ebp - 0x230]
push str.Error__d_in_swprintf_s_n
call fcn.10052604
add esp, 8
push str.Error_in_swprintf_s_n
jmp 0x1001864d
push str.Memory_allocation_error_in_log_file_n
call fcn.10052604
add esp, 4
push str.Memory_allocation_error_in_log_file_n
call esi
mov eax, dword [ebp - 0x22c]
test eax, eax
je 0x10018662
push eax
call fcn.10052152
add esp, 4
test ebx, ebx
je 0x1001866f
push ebx
call fcn.10052152
add esp, 4
mov eax, dword [ebp - 0x238]
cmp eax, 0x140006
jne 0x100186af
mov edx, edi
mov ecx, dword [ebp - 0x23c]
call fcn.10018bc0
test eax, eax
jne 0x100186a9
mov dword [ebp - 0x238], 0x140007
mov eax, dword [ebp - 0x23c]
mov dword [eax + 0x38], 0
jmp 0x100189e5
mov eax, dword [ebp - 0x238]
cmp eax, 0x140007
je 0x10018770
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov dword [ebp - 0x240], 0xffffffff
mov ebx, dword [sym.imp.KERNEL32.dll_GetLastError]
push 0
push 0x80
push 2
push 0
push 0
push 0x40000000
lea eax, [ebp - 0x224]
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov edi, eax
mov dword [ebp - 0x240], edi
cmp edi, 0xffffffff
jne 0x100188bf
call ebx
add eax, 0x1e
mov dword [ebp - 0x228], eax
call ebx
lea ebx, [eax + 0x1e]
push 0x1000a
call fcn.1005218a
add esp, 4
mov edi, eax
test edi, edi
jne 0x10018849
push str.Memory_allocation_error_in_log_file_n
call fcn.10052604
add esp, 4
push str.Memory_allocation_error_in_log_file_n
call esi
jmp 0x100188a1
push 0
lea eax, [ebp - 0x234]
push eax
push 0x4238
mov eax, dword [ebp - 0x23c]
add eax, 0x20
push eax
push edi
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x10018782
cmp dword [ebp - 0x234], 0x4238
jne 0x10018782
mov eax, dword [ebp - 0x23c]
mov dword [eax + 0x38], 0
jmp 0x100189e5
call ebx
add eax, 0x1e
mov dword [ebp - 0x228], eax
call ebx
lea ebx, [eax + 0x1e]
push 0x1000a
call fcn.1005218a
add esp, 4
mov edi, eax
test edi, edi
je 0x10018728
push 0x100865c0
push 0xffff
push edi
call fcn.10052136
add esp, 0xc
push ebx
test eax, eax
jle 0x10018884
mov byte [edi + 0xffff], 0
push edi
push str.LoadApplicationConfig
push 1
mov edx, 0xd1
mov ecx, str...StandAloneSvcAppFiles.cpp
call fcn.10001cf0
add esp, 0x10
jmp 0x10018898
call ebx
add eax, 0x1e
mov dword [ebp - 0x228], eax
call ebx
lea ebx, [eax + 0x1e]
push 0x1000a
call fcn.1005218a
add esp, 4
mov edi, eax
test edi, edi
je 0x10018728
push 0x100865c0
push 0xffff
push edi
call fcn.10052136
add esp, 0xc
push ebx
test eax, eax
jle 0x10018884
mov byte [edi + 0xffff], 0
push edi
push str.LoadApplicationConfig
push 1
mov edx, 0xb4
mov ecx, str...StandAloneSvcAppFiles.cpp
call fcn.10001cf0
add esp, 0x10
jmp 0x10018898
push 0x100865c0
push 0xffff
push edi
call fcn.10052136
add esp, 0xc
push ebx
test eax, eax
jle 0x10018884
mov byte [edi + 0xffff], 0
push edi
push str.LoadApplicationConfig
push 1
mov edx, 0xa2
mov ecx, str...StandAloneSvcAppFiles.cpp
call fcn.10001cf0
add esp, 0x10
jmp 0x10018898
push str.Error__d_in_swprintf_s_n
call fcn.10052604
add esp, 8
push str.Error_in_swprintf_s_n
call esi
push edi
call fcn.10052152
add esp, 4
push 0xfffffffffffffffe
lea eax, [ebp - 0x10]
push eax
push 0x1009cbc0
call fcn.10062b20
add esp, 0xc
mov eax, dword [ebp - 0x228]
jmp 0x10018ba1
push 0
lea eax, [ebp - 0x234]
push eax
push 4
lea eax, [ebp - 0x238]
push eax
push edi
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x10018a83
cmp dword [ebp - 0x234], 4
jne 0x10018a83
xor edx, edx
mov ecx, dword [ebp - 0x23c]
call fcn.10035040
mov dword [ebp - 0x230], eax
test eax, eax
je 0x100189b6
push 0x1000a
call fcn.1005218a
add esp, 4
mov edi, eax
test edi, edi
jne 0x10018937
push str.Memory_allocation_error_in_log_file_n
call fcn.10052604
add esp, 4
push str.Memory_allocation_error_in_log_file_n
call esi
mov ebx, dword [ebp - 0x230]
jmp 0x1001899c
push 0x100865c0
push 0xffff
push edi
call fcn.10052136
add esp, 0xc
test eax, eax
jle 0x10018978
mov byte [edi + 0xffff], 0
mov ebx, dword [ebp - 0x230]
push ebx
push edi
push str.LoadApplicationConfig
push 1
mov edx, 0xaa
mov ecx, str...StandAloneSvcAppFiles.cpp
call fcn.10001cf0
add esp, 0x10
jmp 0x10018993
mov ebx, dword [ebp - 0x230]
push ebx
push str.Error__d_in_swprintf_s_n
call fcn.10052604
add esp, 8
push str.Error_in_swprintf_s_n
call esi
push edi
call fcn.10052152
add esp, 4
push 0xfffffffffffffffe
lea eax, [ebp - 0x10]
push eax
push 0x1009cbc0
call fcn.10062b20
add esp, 0xc
mov eax, ebx
jmp 0x10018ba1
push 0
lea eax, [ebp - 0x234]
push eax
push 0x4238
mov eax, dword [ebp - 0x23c]
add eax, 0x20
push eax
push edi
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x10018a1a
cmp dword [ebp - 0x234], 0x4238
jne 0x10018a1a
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
or esi, 0xffffffff
mov dword [ebp - 0x240], esi
mov ecx, dword [ebp - 0x23c]
call fcn.10018e30
mov dword [ebp - 4], 0
call fcn.10018af2
mov dword [ebp - 4], 0xfffffffe
xor eax, eax
jmp 0x10018ba1
call ebx
add eax, 0x1e
mov dword [ebp - 0x228], eax
call ebx
lea ebx, [eax + 0x1e]
push 0x1000a
call fcn.1005218a
add esp, 4
mov edi, eax
test edi, edi
je 0x10018728
push 0x100865c0
push 0xffff
push edi
call fcn.10052136
add esp, 0xc
push ebx
test eax, eax
jle 0x10018884
mov byte [edi + 0xffff], 0
push edi
push str.LoadApplicationConfig
push 1
mov edx, 0xae
mov ecx, str...StandAloneSvcAppFiles.cpp
call fcn.10001cf0
add esp, 0x10
jmp 0x10018898
call ebx
add eax, 0x1e
mov dword [ebp - 0x228], eax
call ebx
lea ebx, [eax + 0x1e]
push 0x1000a
call fcn.1005218a
add esp, 4
mov edi, eax
test edi, edi
je 0x10018728
push 0x100865c0
push 0xffff
push edi
call fcn.10052136
add esp, 0xc
push ebx
test eax, eax
jle 0x10018884
mov byte [edi + 0xffff], 0
push edi
push str.LoadApplicationConfig
push 1
mov edx, 0xa6
mov ecx, str...StandAloneSvcAppFiles.cpp
call fcn.10001cf0
add esp, 0x10
jmp 0x10018898
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.1005132c
mov esp, ebp
pop ebp
ret