Function at 0x40b040
Capabilities:
Check mutex on windows

Disassembly:
sub esp, 0x218
push ebx
push esi
push edi
push str.KaseyaFirewallLogByPeriodSema
xor ebx, ebx
push ebx
lea eax, [esp + 0x18]
mov edi, 1
push eax
mov dword [esp + 0x1c], 0xc
mov dword [esp + 0x20], ebx
mov dword [esp + 0x24], edi
call dword [sym.imp.KERNEL32.dll_CreateMutexA]
mov esi, eax
cmp esi, ebx
mov dword [esp + 0xc], esi
jne 0x40b0a5
lea ecx, [esp + 0x24]
push str.ERROR:_Failed_to_create_mutex_in_buildFirewallLogByStatPeriod__._n
push ecx
call fcn.004142bd
lea edx, [esp + 0x28]
push edx
mov dword [esp + 0x2c], edi
call fcn.0040c060
add esp, 0xc
pop edi
pop esi
pop ebx
add esp, 0x218
ret
push 0xffffffffffffffff
push esi
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
test eax, eax
je 0x40b0e3
lea eax, [esp + 0x24]
push str.ERROR:_Failed_to_obtain_mutex_in_buildFirewallLogByStatPeriod__._n
push eax
call fcn.004142bd
lea ecx, [esp + 0x28]
push ecx
mov dword [esp + 0x2c], edi
call fcn.0040c060
add esp, 0xc
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
pop edi
pop esi
pop ebx
add esp, 0x218
ret
mov eax, dword [0x427aec]
cmp eax, ebx
push ebp
mov ebp, dword [esp + 0x22c]
mov edi, eax
je 0x40b189
lea edx, [ebp + 4]
lea ecx, [ecx]
mov esi, edx
lea eax, [edi + 8]
mov bl, byte [eax]
mov cl, bl
cmp bl, byte [esi]
jne 0x40b129
test cl, cl
je 0x40b125
mov bl, byte [eax + 1]
mov cl, bl
cmp bl, byte [esi + 1]
jne 0x40b129
add eax, 2
add esi, 2
test cl, cl
jne 0x40b105
xor eax, eax
jmp 0x40b12e
sbb eax, eax
sbb eax, 0xffffffff
test eax, eax
jne 0x40b17d
mov eax, dword [edi + 0xc]
cmp eax, dword [ebp + 8]
jne 0x40b17d
lea esi, [ebp + 0xc]
lea eax, [edi + 0x10]
mov bl, byte [eax]
mov cl, bl
cmp bl, byte [esi]
jne 0x40b164
test cl, cl
je 0x40b160
mov bl, byte [eax + 1]
mov cl, bl
cmp bl, byte [esi + 1]
jne 0x40b164
add eax, 2
add esi, 2
test cl, cl
jne 0x40b140
xor eax, eax
jmp 0x40b169
sbb eax, eax
sbb eax, 0xffffffff
test eax, eax
jne 0x40b17d
mov ecx, dword [edi + 0x14]
cmp ecx, dword [ebp + 0x10]
jne 0x40b17d
mov eax, dword [edi + 0x18]
cmp eax, dword [ebp + 0x14]
je 0x40b1dc
mov ebx, edi
mov edi, dword [edi]
test edi, edi
jne 0x40b100
push 0x124
call fcn.00414902
mov esi, eax
add esp, 4
test esi, esi
jne 0x40b1c5
push 0x124
lea ecx, [esp + 0x2c]
push str.Failed_to_allocate__d_bytes_for_the_firewall_log_table._n
push ecx
call fcn.004142bd
lea edx, [esp + 0x30]
push edx
mov dword [esp + 0x34], 1
call fcn.0040c060
add esp, 0x10
xor eax, eax
test ebx, ebx
mov ecx, 0x49
mov edi, esi
rep stosd dword es:[edi], eax
jne 0x40b1e4
mov dword [0x427aec], esi
jmp 0x40b1e6
inc dword [edi + 4]
jmp 0x40b26a
mov dword [ebx], esi
push 4
lea eax, [ebp + 4]
push eax
lea ecx, [esi + 8]
mov edi, 1
push ecx
mov dword [esi + 4], edi
call fcn.00414960
mov edx, dword [ebp + 8]
push 4
lea eax, [ebp + 0xc]
push eax
lea ecx, [esi + 0x10]
push ecx
mov dword [esi + 0xc], edx
call fcn.00414960
mov edx, dword [ebp + 0x10]
lea ecx, [esp + 0x38]
push ecx
push 0
push esi
push 0x40afa0
mov dword [esi + 0x14], edx
mov eax, dword [ebp + 0x14]
push 0
push 0
mov dword [esi + 0x18], eax
mov dword [esi], 0
call fcn.004150e5
add esp, 0x30
test eax, eax
jne 0x40b263
lea edx, [esp + 0x28]
push str.Failed_to_start_thread_for_DNS_lookup_n
push edx
call fcn.004142bd
lea eax, [esp + 0x2c]
push eax
mov dword [esp + 0x30], edi
call fcn.0040c060
add esp, 0xc
jmp 0x40b26a
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov esi, dword [esp + 0x10]
push esi
call dword [sym.imp.KERNEL32.dll_ReleaseMutex]
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
pop ebp
pop edi
pop esi
pop ebx
add esp, 0x218
ret