Function at 0x405340
Capabilities:
Create mailslot
Read .ini file

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x158
push ebx
push esi
push edi
mov dword [ebp - 0x10c], 0
mov dword [ebp - 0xbc], 0x42a4c
mov dword [ebp - 0x144], 0x79c56
mov eax, 0x3e1
mov word [ebp - 0xac], ax
movzx ecx, word [ebp - 0xac]
mov edx, dword [ebp - 0x10c]
add edx, 0xc596c
sub edx, dword [ebp - 0x10c]
and edx, 0x54eed
or ecx, edx
mov word [ebp - 0xac], cx
movzx eax, word [ebp - 0xac]
cmp eax, 0x6ea11
jne 0x4053bb
movzx ecx, word [ebp - 0xac]
cmp ecx, dword [ebp - 0x10c]
je 0x4053c4
cmp dword [ebp - 0x10c], 0
jne 0x405424
mov edx, 0x20d8d
sub edx, dword [ebp - 0x10c]
sub edx, dword [ebp - 0x10c]
mov eax, dword [ebp - 0x10c]
lea esi, [edx + eax + 0x54a24]
and esi, 0x710ea
mov edi, dword [ebp - 0x10c]
sub edi, dword [ebp - 0x10c]
push 0
push 0
push 0
push 0
push 0
call dword [sym.imp.KERNEL32.dll_GetThreadTimes]
sub edi, eax
and esi, edi
push 0
push 0
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
sub eax, dword [ebp - 0x10c]
or esi, eax
mov dword [ebp - 0x10c], esi
jmp 0x405477
mov ecx, dword [ebp - 0x10c]
add ecx, 0x14d1fb
movzx edx, word [ebp - 0xac]
sub ecx, edx
sub ecx, 0x65246
xor eax, eax
and ecx, dword [ebp - 0x70]
and eax, dword [ebp - 0x6c]
mov edx, dword [ebp - 0x10c]
add edx, dword [ebp - 0x10c]
xor esi, esi
and ecx, edx
and eax, esi
mov edx, dword [ebp - 0x10c]
xor esi, esi
and ecx, edx
and eax, esi
mov edx, dword [ebp - 0x10c]
xor esi, esi
or ecx, edx
or eax, esi
mov dword [ebp - 0x10c], ecx
cmp dword [ebp - 0x10c], 0x4ffa6
je 0x4054d3
mov eax, dword [ebp - 0x10c]
cmp eax, dword [ebp - 0x10c]
je 0x4054d3
mov ecx, dword [ebp - 0x10c]
xor edx, edx
mov dword [ebp - 0x150], ecx
mov dword [ebp - 0x14c], edx
mov eax, dword [ebp - 0x6c]
cmp eax, dword [ebp - 0x14c]
ja 0x4054d3
jb 0x4054bd
mov ecx, dword [ebp - 0x70]
cmp ecx, dword [ebp - 0x150]
jae 0x4054d3
mov edx, dword [ebp - 0x70]
or edx, dword [ebp - 0x6c]
je 0x4054d3
movzx eax, byte [ebp - 0x81]
cmp eax, 0x7cbe3
jge 0x4054e0
mov ecx, 0x5d88
mov dword [ebp - 0x10c], ecx
jmp 0x40552e
movzx edx, word [ebp - 0xac]
mov eax, dword [ebp - 0x10c]
sub eax, edx
movzx ecx, byte [ebp - 0x81]
add eax, dword [ebp - 0x10c]
lea esi, [ecx + eax + 0xc079d]
movzx edx, word [ebp - 0xac]
sub esi, edx
add esi, 0x36aec
and esi, 0x68e98
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleHandleA]
and esi, eax
and esi, 0xfffea21a
mov dword [ebp - 0x10c], esi
mov eax, 0x34c07
sub eax, dword [ebp - 0x10c]
or eax, 0x59c65
mov esi, eax
xor edi, edi
movzx ecx, word [ebp - 0xac]
mov edx, dword [ebp - 0x10c]
sub edx, ecx
add edx, 0xef09
xor eax, eax
and edx, dword [ebp - 0x70]
and eax, dword [ebp - 0x6c]
or esi, edx
or edi, eax
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleHandleW]
xor ecx, ecx
or esi, eax
or edi, ecx
mov dword [ebp - 0x10c], esi
mov edx, dword [ebp - 0x10c]
mov dword [ebp - 0x10c], edx
cmp dword [ebp - 0x10c], 0x1e86e
je 0x40559b
cmp dword [ebp - 0x10c], 0x71af5
jne 0x4055bd
mov eax, dword [ebp - 0x10c]
and eax, 0x19604
movzx ecx, byte [ebp - 0x81]
sub ecx, 0x33e12
and eax, ecx
mov dword [ebp - 0x10c], eax
jmp 0x40561a
mov esi, dword [ebp - 0x10c]
add esi, 0x27c02
push 0
push 0
push 0
push 0
push 0
push 0
call dword [sym.imp.KERNEL32.dll_GetPrivateProfileStringW]
sub esi, eax
movzx edi, byte [ebp - 0x81]
sub edi, dword [ebp - 0x10c]
movzx edx, byte [ebp - 0x81]
add edi, edx
push 0
push 0
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
add edi, eax
and esi, edi
or esi, dword [ebp - 0x10c]
mov eax, dword [ebp - 0x10c]
and eax, 0x4ac1c
or esi, eax
mov dword [ebp - 0x10c], esi
push 0
push 0
call dword [sym.imp.KERNEL32.dll_ResetWriteWatch]
mov esi, eax
add esi, 0x29c3c
call dword [sym.imp.KERNEL32.dll_AreFileApisANSI]
sub esi, eax
sub esi, dword [ebp - 0x10c]
mov ecx, dword [ebp - 0x10c]
add ecx, 0x61585
and ecx, 0x36d76
and ecx, 0x62868
or esi, ecx
mov word [ebp - 0xac], si
push 0
push 0
push 0
call dword [sym.imp.KERNEL32.dll_GetFileAttributesExW]
cmp eax, dword [ebp - 0x10c]
je 0x4056d2
push 0
push 0
push 0
call dword [sym.imp.KERNEL32.dll_OpenSemaphoreW]
xor edx, edx
mov dword [ebp - 0x158], eax
mov dword [ebp - 0x154], edx
mov eax, dword [ebp - 0x158]
cmp eax, dword [ebp - 0x70]
jne 0x40569f
mov ecx, dword [ebp - 0x154]
cmp ecx, dword [ebp - 0x6c]
je 0x4056d2
push 0
push 0
push 0
push 0
call dword [sym.imp.KERNEL32.dll_CreateMailslotW]
cmp eax, 0x1e7a2
je 0x4056d2
cmp dword [ebp - 0x10c], 0x5c811
jb 0x4056e2
push 0
push 0
push 0
push 0
call dword [sym.imp.KERNEL32.dll_SetFileTime]
test eax, eax
jne 0x4056e2
mov edx, dword [ebp - 0x10c]
xor eax, eax
mov dword [ebp - 0x70], edx
mov dword [ebp - 0x6c], eax
jmp 0x40571c
mov ecx, dword [ebp - 0x10c]
add ecx, 0x81bae
mov ebx, ecx
xor esi, esi
add ebx, dword [ebp - 0x70]
adc esi, dword [ebp - 0x6c]
push 0
push 0
push 0
call dword [sym.imp.KERNEL32.dll_BindIoCompletionCallback]
xor edx, edx
add ebx, eax
adc esi, edx
mov eax, dword [ebp - 0x10c]
xor ecx, ecx
and ebx, eax
and esi, ecx
mov byte [ebp - 0x81], bl
xor edx, edx
jne 0x40573f
cmp dword [ebp - 0x10c], 0x6da6e
jne 0x405753
xor eax, eax
je 0x405753
movzx ecx, word [ebp - 0xac]
cmp ecx, 0x2884
jne 0x405753
mov edx, dword [ebp - 0x10c]
add edx, 0x7f81e
mov dword [ebp - 0x10c], edx
jmp 0x405791
mov esi, 0x2368
sub esi, dword [ebp - 0x10c]
and esi, dword [ebp - 0x10c]
push 0
push 0
push 0
push 0
push 0
push 0
call dword [sym.imp.KERNEL32.dll_CreateFileMappingW]
mov ecx, dword [ebp - 0x10c]
lea edx, [eax + ecx + 0x1feaf]
sub edx, dword [ebp - 0x10c]
or esi, edx
mov dword [ebp - 0x10c], esi
mov eax, dword [ebp - 0x10c]
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0x24