Function at 0x426360
Capabilities:
Check mutex on windows
Create directory
Resolve function by parsing pe exports
Write file on windows

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
push 0xffffffffffffffff
push 0x4b08f2
mov eax, dword fs:[0]
push eax
sub esp, 0x380
mov eax, dword [0x4d8c20]
xor eax, esp
mov dword [esp + 0x378], eax
push ebx
push esi
push edi
mov eax, dword [0x4d8c20]
xor eax, esp
push eax
lea eax, [esp + 0x390]
mov dword fs:[0], eax
mov eax, dword [ebp + 8]
xor edi, edi
test byte [0x4de5a0], 1
mov dword [esp + 0x1c], eax
jne 0x4263d8
or dword [0x4de5a0], 1
push str.KOMETA_LOGGING_MUTEX
push edi
push edi
call dword [sym.imp.KERNEL32.dll_CreateMutexW]
push 0x4b3550
mov dword [0x4de540], eax
call fcn.00475bb7
add esp, 4
mov eax, dword [0x4de540]
push 0xffffffffffffffff
push eax
mov dword [esp + 0x44], eax
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
test eax, eax
sete al
mov byte [esp + 0x40], al
mov dword [esp + 0x398], edi
test al, al
je 0x426a57
test byte [0x4de5a0], 2
jne 0x42642b
or dword [0x4de5a0], 2
push 0x4b3510
mov dword [0x4de538], edi
mov dword [0x4de53c], edi
call fcn.00475bb7
add esp, 4
cmp byte [0x4de52e], 0
jne 0x4268fc
mov esi, 7
xor ecx, ecx
mov dword [esp + 0xa8], esi
mov dword [esp + 0xa4], edi
mov word [esp + 0x94], cx
xor edx, edx
mov dword [esp + 0x60], esi
mov dword [esp + 0x5c], edi
mov word [esp + 0x4c], dx
push 0x208
lea ecx, [esp + 0x17a]
xor eax, eax
push edi
mov byte [esp + 0x3a0], 2
push ecx
mov word [esp + 0x180], ax
call fcn.0047f860
add esp, 0xc
push 0x104
lea edx, [esp + 0x178]
push edx
push edi
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
test eax, eax
jne 0x4264bb
push 0x4d0358
lea eax, [esp + 0x38]
push eax
mov dword [esp + 0x3c], 2
call fcn.00478c1f
lea ecx, [esp + 0x174]
push ecx
lea ecx, [esp + 0x140]
call fcn.00426300
lea edx, [esp + 0x158]
mov bl, 3
push edx
lea ecx, [esp + 0x140]
mov byte [esp + 0x39c], bl
call fcn.004a10b0
push 0xffffffffffffffff
push edi
push eax
lea ecx, [esp + 0xa0]
mov byte [esp + 0x3a4], 4
call fcn.00403cc2
mov byte [esp + 0x398], bl
cmp dword [esp + 0x16c], 8
jb 0x426525
mov eax, dword [esp + 0x158]
push eax
call fcn.00475dcb
add esp, 4
mov ecx, dword [esp + 0xa4]
lea eax, [ecx - 4]
cmp eax, ecx
ja 0x426544
push 0xffffffffffffffff
push eax
lea ecx, [esp + 0x9c]
call fcn.004044c5
jmp 0x426554
sub eax, ecx
push edi
push eax
lea ecx, [esp + 0x9c]
call fcn.004112e0
xor ecx, ecx
push 0xa
mov word [esp + 0xd0], cx
push str.NetBoxLogs
lea ecx, [esp + 0xd4]
mov dword [esp + 0xe8], esi
mov dword [esp + 0xe4], edi
call fcn.00404447
lea esi, [esp + 0x104]
mov byte [esp + 0x398], 5
call fcn.00419320
push eax
lea ebx, [esp + 0xd0]
lea edi, [esp + 0xec]
mov byte [esp + 0x39c], 6
call fcn.00419220
add esp, 4
mov edi, eax
lea edx, [esp + 0x4c]
cmp edx, edi
je 0x426627
cmp dword [esp + 0x60], 8
jb 0x4265d0
mov eax, dword [esp + 0x4c]
push eax
call fcn.00475dcb
add esp, 4
xor ebx, ebx
xor ecx, ecx
mov esi, 7
mov dword [esp + 0x60], esi
mov dword [esp + 0x5c], ebx
mov word [esp + 0x4c], cx
cmp dword [edi + 0x14], 8
jae 0x426604
mov eax, dword [edi + 0x10]
lea edx, [eax + eax + 2]
push edx
lea eax, [esp + 0x50]
push edi
push eax
call fcn.00475550
add esp, 0xc
jmp 0x42660c
mov ecx, dword [edi]
mov dword [esp + 0x4c], ecx
mov dword [edi], ebx
mov edx, dword [edi + 0x10]
mov dword [esp + 0x5c], edx
mov eax, dword [edi + 0x14]
mov dword [esp + 0x60], eax
xor ecx, ecx
mov dword [edi + 0x14], esi
mov dword [edi + 0x10], ebx
mov word [edi], cx
jmp 0x42662c
xor ebx, ebx
lea esi, [ebx + 7]
cmp dword [esp + 0xfc], 8
jb 0x426646
mov edx, dword [esp + 0xe8]
push edx
call fcn.00475dcb
add esp, 4
xor eax, eax
cmp dword [esp + 0x118], 8
mov dword [esp + 0xfc], esi
mov dword [esp + 0xf8], ebx
mov word [esp + 0xe8], ax
jb 0x426678
mov ecx, dword [esp + 0x104]
push ecx
call fcn.00475dcb
add esp, 4
xor edx, edx
cmp dword [esp + 0xe0], 8
mov dword [esp + 0x118], esi
mov dword [esp + 0x114], ebx
mov word [esp + 0x104], dx
jb 0x4266aa
mov eax, dword [esp + 0xcc]
push eax
call fcn.00475dcb
add esp, 4
cmp dword [esp + 0x60], 8
mov eax, dword [esp + 0x4c]
jae 0x4266b9
lea eax, [esp + 0x4c]
push ebx
push eax
call dword [sym.imp.KERNEL32.dll_CreateDirectoryW]
mov edi, 8
cmp dword [esp + 0x150], edi
jb 0x4266df
mov ecx, dword [esp + 0x13c]
push ecx
call fcn.00475dcb
add esp, 4
push ebx
call dword [sym.imp.KERNEL32.dll_GetProcessId]
lea edx, [esp + 0x28]
push edx
mov dword [esp + 0x34], eax
mov dword [esp + 0x2c], ebx
mov dword [esp + 0x30], ebx
call dword [sym.imp.KERNEL32.dll_GetSystemTimeAsFileTime]
xor eax, eax
lea ecx, [esp + 0x68]
push ecx
lea edx, [esp + 0x2c]
push edx
mov word [esp + 0x70], ax
mov dword [esp + 0x72], eax
mov dword [esp + 0x76], eax
mov dword [esp + 0x7a], eax
mov word [esp + 0x7e], ax
call dword [sym.imp.KERNEL32.dll_FileTimeToSystemTime]
xor eax, eax
mov dword [esp + 0x8c], esi
mov dword [esp + 0x88], ebx
mov word [esp + 0x78], ax
lea ecx, [esp + 0x44]
push ecx
mov ecx, str._s__d__d__d___d__d.log
mov byte [esp + 0x39c], 8
call fcn.004276a0
add esp, 4
lea edx, [esp + 0x78]
mov byte [esp + 0x398], 9
push eax
lea ecx, [esp + 0x98]
mov dword [esp + 0x24], edx
call fcn.00427730
push eax
lea ecx, [esp + 0x72]
call fcn.004277b0
push eax
lea ecx, [esp + 0x6e]
call fcn.004277b0
push eax
lea ecx, [esp + 0x6c]
call fcn.004277b0
push eax
lea ecx, [esp + 0x70]
call fcn.004277b0
push eax
lea ecx, [esp + 0x34]
call fcn.00427830
push eax
lea ecx, [esp + 0x24]
call fcn.004278b0
lea eax, [esp + 0x44]
mov byte [esp + 0x398], 8
call fcn.00422dc0
cmp dword [esp + 0x88], ebx
je 0x42688d
lea eax, [esp + 0x4c]
push eax
lea ebx, [esp + 0x7c]
lea edi, [esp + 0x124]
call fcn.00419220
add esp, 4
mov bl, 0xa
push 4
mov byte [esp + 0x39c], bl
call fcn.00475e26
mov edi, eax
add esp, 4
mov dword [esp + 0x18], edi
mov byte [esp + 0x398], 0xb
test edi, edi
je 0x426857
cmp dword [esp + 0x134], 8
mov eax, dword [esp + 0x120]
jae 0x426820
lea eax, [esp + 0x120]
push 0x40
push 0x4bfbf8
push eax
mov dword [edi], 0
call fcn.004784cd
add esp, 0xc
mov dword [edi], eax
test eax, eax
jne 0x426853
push 0x4d0358
lea ecx, [esp + 0x28]
push ecx
mov dword [esp + 0x2c], 1
call fcn.00478c1f
mov eax, edi
jmp 0x426859
xor eax, eax
mov byte [esp + 0x398], bl
call fcn.00427a00
cmp dword [esp + 0x134], 8
mov byte [0x4de52e], 1
jb 0x426886
mov edx, dword [esp + 0x120]
push edx
call fcn.00475dcb
add esp, 4
mov edi, 8
xor ebx, ebx
cmp dword [esp + 0x8c], edi
jb 0x4268a3
mov eax, dword [esp + 0x78]
push eax
call fcn.00475dcb
add esp, 4
xor ecx, ecx
mov dword [esp + 0x8c], esi
mov dword [esp + 0x88], ebx
mov word [esp + 0x78], cx
cmp dword [esp + 0x60], edi
jb 0x4268cb
mov edx, dword [esp + 0x4c]
push edx
call fcn.00475dcb
add esp, 4
xor eax, eax
mov byte [esp + 0x398], bl
mov dword [esp + 0x60], esi
mov dword [esp + 0x5c], ebx
mov word [esp + 0x4c], ax
cmp dword [esp + 0xa8], edi
jb 0x4268fa
mov ecx, dword [esp + 0x94]
push ecx
call fcn.00475dcb
add esp, 4
xor edi, edi
mov eax, dword [0x4de53c]
mov edx, dword [0x4de538]
mov dword [esp + 0x10], edi
mov dword [esp + 0x14], edi
mov ebx, eax
mov dword [esp + 0x38], edx
test eax, eax
je 0x42694c
mov ecx, dword [eax + 4]
lea edx, [eax + 4]
test ecx, ecx
je 0x426948
lea esi, [ecx + 1]
mov edi, edx
mov eax, ecx
lock cmpxchg dword [edi], esi
cmp eax, ecx
je 0x42693a
mov ecx, dword [edx]
test ecx, ecx
jne 0x426923
jmp 0x426948
mov ecx, dword [esp + 0x38]
push ecx
lea esi, [esp + 0x14]
call fcn.00428850
mov edi, dword [esp + 0x14]
mov byte [esp + 0x398], 0xc
cmp dword [esp + 0x10], 0
je 0x426a17
mov eax, dword [esp + 0x1c]
cmp dword [eax + 0x14], 8
jb 0x42696b
mov eax, dword [eax]
push 0xffffffffffffffff
push eax
lea eax, [esp + 0x20]
mov dword [esp + 0x20], 2
call fcn.0040e000
mov ecx, eax
add esp, 8
mov dword [esp + 0xc4], 0xf
mov dword [esp + 0xc0], 0
mov byte [esp + 0xb0], 0
lea esi, [ecx + 1]
mov dl, byte [ecx]
inc ecx
test dl, dl
jne 0x4269a5
sub ecx, esi
push ecx
push eax
lea ecx, [esp + 0xb8]
call fcn.004040a8
mov eax, dword [esp + 0xc0]
mov ebx, 0x10
test eax, eax
je 0x4269fe
mov ecx, dword [esp + 0xb0]
cmp dword [esp + 0xc4], ebx
jae 0x4269e3
lea ecx, [esp + 0xb0]
mov esi, dword [esp + 0x10]
mov edx, dword [esi]
push edx
push eax
push 1
push ecx
call fcn.004771f3
mov eax, dword [esi]
push eax
call fcn.00476b71
add esp, 0x14
cmp dword [esp + 0xc4], ebx
jb 0x426a17
mov ecx, dword [esp + 0xb0]
push ecx
call fcn.00475dcb
add esp, 4
mov byte [esp + 0x398], 0
test edi, edi
je 0x426a4c
lea edx, [edi + 4]
or eax, 0xffffffff
lock xadd dword [edx], eax
jne 0x426a4c
mov edx, dword [edi]
mov eax, dword [edx]
mov ecx, edi
call eax
lea ecx, [edi + 8]
or edx, 0xffffffff
lock xadd dword [ecx], edx
jne 0x426a4c
mov eax, dword [edi]
mov edx, dword [eax + 4]
mov ecx, edi
call edx
mov eax, dword [esp + 0x3c]
push eax
call dword [sym.imp.KERNEL32.dll_ReleaseMutex]
mov ecx, dword [esp + 0x390]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x378]
xor ecx, esp
call fcn.004751dc
mov esp, ebp
pop ebp
ret