Function at 0x40c770
Capabilities:
Resolve function by parsing pe exports
Write file on windows

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
push 0xffffffffffffffff
push 0x45a705
mov eax, dword fs:[0]
push eax
sub esp, 0xa0
mov eax, dword [0x4714d0]
xor eax, esp
mov dword [esp + 0x98], eax
push ebx
push esi
push edi
mov eax, dword [0x4714d0]
xor eax, esp
push eax
lea eax, [esp + 0xb0]
mov dword fs:[0], eax
mov esi, ecx
mov eax, dword [0x476c44]
mov byte [esi + 0x14], 1
test al, 1
jne 0x40c803
or eax, 1
mov dword [0x476c44], eax
push 0xfc8
push 0
push 0x476c48
mov dword [esp + 0xc4], 0
call fcn.00443760
add esp, 0xc
call fcn.0040a020
push 0x45db30
call fcn.0043e1e7
add esp, 4
mov dword [esp + 0xb8], 0xffffffff
mov eax, dword [0x476c58]
mov ecx, 0x476c58
push 6
push 0
mov eax, dword [eax + 0x1c]
call eax
test al, al
je 0x40c929
mov eax, dword [0x476c44]
test al, 1
jne 0x40c86b
or eax, 1
mov dword [0x476c44], eax
push 0xfc8
push 0
push 0x476c48
mov dword [esp + 0xc4], 1
call fcn.00443760
add esp, 0xc
call fcn.0040a020
push 0x45db30
call fcn.0043e1e7
add esp, 4
mov dword [esp + 0xb8], 0xffffffff
mov eax, dword [0x476c58]
mov ecx, 0x476c58
push 6
push 0
call dword [eax + 0x6c]
mov ebx, eax
mov edx, 0x2000
mov ecx, dword [ebx + 0x20]
sub edx, ecx
lea edi, [ecx + 0x24]
mov ecx, 0x3a
add edi, ebx
mov dword [esp + 0x14], ecx
add edx, edi
mov eax, edi
sub edx, edi
cmp edx, ecx
jae 0x40c8aa
mov ecx, edx
mov dword [esp + 0x14], ecx
test edx, edx
je 0x40c8bf
push ecx
push str.___________________start_run______________________________
push edi
call fcn.00441040
mov eax, dword [esp + 0x20]
add esp, 0xc
add eax, edi
sub eax, edi
add dword [ebx + 0x20], eax
mov eax, dword [0x476c44]
test al, 1
jne 0x40c911
or eax, 1
mov dword [0x476c44], eax
push 0xfc8
push 0
push 0x476c48
mov dword [esp + 0xc4], 2
call fcn.00443760
add esp, 0xc
call fcn.0040a020
push 0x45db30
call fcn.0043e1e7
add esp, 4
mov dword [esp + 0xb8], 0xffffffff
mov eax, dword [0x476c58]
mov ecx, 0x476c58
push 0x783
push str.log4z.cpp
push ebx
call dword [eax + 0x20]
push 0
push 1
push dword [esi + 0x1c]
call dword [sym.imp.KERNEL32.dll_ReleaseSemaphore]
push 0x4c
lea eax, [esp + 0x5c]
mov dword [esp + 0x18], 0
push 0
push eax
mov dword [esp + 0x60], 0
call fcn.00443760
add esp, 0xc
push 0
call fcn.0043f9e8
mov dword [esp + 0x1c], edx
add esp, 4
mov dword [esp + 0x1c], eax
lea esp, [esp]
lea eax, [esp + 0x14]
mov ecx, esi
push eax
call fcn.0040c660
test al, al
je 0x40c9ad
mov edi, dword [esp + 0x14]
mov eax, dword [edi]
test eax, eax
js 0x40c993
cmp eax, dword [esi + 0x78]
jle 0x40ca6a
mov eax, dword [esi + 0x10]
lea ecx, [esi + 0x10]
push edi
call dword [eax + 0x70]
lea eax, [esp + 0x14]
mov ecx, esi
push eax
call fcn.0040c660
test al, al
jne 0x40c980
xor ebx, ebx
cmp dword [esi + 0x78], ebx
jl 0x40ca0b
lea edi, [esi + 0xf8]
lea ebx, [ebx]
cmp byte [edi - 0x24], 0
je 0x40c9ea
cmp dword [esp + ebx*4 + 0x54], 0
jle 0x40c9e4
mov eax, dword [edi]
test eax, eax
je 0x40c9dc
push eax
call fcn.004400b7
add esp, 4
mov dword [esp + ebx*4 + 0x54], 0
cmp byte [edi - 0x24], 0
jne 0x40c9ff
mov eax, dword [edi]
test eax, eax
je 0x40c9ff
push eax
call fcn.0043e4ba
add esp, 4
mov dword [edi], 0
inc ebx
add edi, 0x88
cmp ebx, dword [esi + 0x78]
jle 0x40c9c0
push 0x32
call dword [sym.imp.KERNEL32.dll_Sleep]
cmp byte [esi + 0x14], 0
jne 0x40ca26
cmp dword [esi + 0xc4c], 0
je 0x40cbda
cmp dword [esi + 0x20], 0
je 0x40c970
push 0
call fcn.0043f9e8
mov edi, eax
add esp, 4
sub edi, dword [esp + 0x1c]
mov ecx, edx
mov eax, dword [esi + 0x20]
sbb ecx, dword [esp + 0x18]
cdq
cmp ecx, edx
jl 0x40c970
jg 0x40ca5c
cmp edi, eax
jbe 0x40c970
mov eax, dword [esi + 0x10]
lea ecx, [esi + 0x10]
call dword [eax + 0x50]
jmp 0x40c957
imul eax, eax, 0x88
lea ebx, [esi + 0x80]
add ebx, eax
cmp dword [edi + 4], 0
je 0x40cb0b
mov eax, dword [edi + 0x20]
lea ecx, [edi + 0x24]
push eax
push ecx
lea ecx, [esp + 0x2c]
mov dword [esp + 0x40], 0xf
mov dword [esp + 0x3c], 0
mov byte [esp + 0x2c], 0
call fcn.004037a0
lea eax, [esp + 0x24]
mov dword [esp + 0xb8], 3
push eax
push dword [edi + 8]
mov ecx, esi
push dword [edi + 4]
push dword [edi]
call fcn.0040b7a0
mov dword [esp + 0xb8], 0xffffffff
cmp dword [esp + 0x38], 0x10
jb 0x40cae5
push dword [esp + 0x24]
call fcn.0043e223
add esp, 4
mov eax, dword [ebx + 0x78]
test eax, eax
je 0x40cafc
push eax
call fcn.0043e4ba
add esp, 4
mov dword [ebx + 0x78], 0
mov eax, dword [esi + 0x10]
lea ecx, [esi + 0x10]
push edi
call dword [eax + 0x70]
jmp 0x40c970
add dword [esi + 0xfb0], 1
adc dword [esi + 0xfb4], 0
cmp byte [ebx + 0x54], 0
je 0x40cbcb
mov eax, dword [edi + 0xc]
cmp eax, dword [ebx + 0x48]
jl 0x40cbcb
cmp byte [ebx + 0x4c], 0
je 0x40cb41
push eax
lea eax, [edi + 0x24]
mov ecx, esi
push eax
call fcn.0040ab50
cmp byte [ebx + 0x4d], 0
je 0x40cbad
push edi
mov ecx, esi
call fcn.0040c190
test al, al
jne 0x40cb62
mov eax, dword [esi + 0x10]
lea ecx, [esi + 0x10]
push edi
call dword [eax + 0x70]
jmp 0x40c970
mov ecx, dword [ebx + 0x78]
mov eax, dword [edi + 0x20]
mov dword [esp + 0x20], eax
test ecx, ecx
je 0x40cba1
test eax, eax
je 0x40cba1
push ecx
push eax
lea eax, [edi + 0x24]
push 1
push eax
call fcn.0043e381
add esp, 0x10
cmp eax, dword [esp + 0x20]
je 0x40cba1
mov eax, dword [ebx + 0x78]
test eax, eax
je 0x40cba1
push eax
call fcn.0043e4ba
add esp, 4
mov dword [ebx + 0x78], 0
mov eax, dword [edi + 0x20]
add dword [ebx + 0x74], eax
mov eax, dword [edi]
inc dword [esp + eax*4 + 0x54]
add dword [esi + 0xfb8], 1
adc dword [esi + 0xfbc], 0
mov eax, dword [edi + 0x20]
cdq
add dword [esi + 0xfc0], eax
adc dword [esi + 0xfc4], edx
mov eax, dword [esi + 0x10]
lea ecx, [esi + 0x10]
push edi
call dword [eax + 0x70]
jmp 0x40c970
xor ebx, ebx
cmp dword [esi + 0x78], ebx
jl 0x40cc95
lea edi, [esi + 0xf8]
jmp 0x40cbf0
cmp byte [edi - 0x24], 0
je 0x40cc85
mov byte [edi - 0x24], 0
test ebx, ebx
js 0x40cc1e
cmp ebx, dword [esi + 0x78]
jg 0x40cc1e
mov eax, dword [edi]
test eax, eax
je 0x40cc85
push eax
call fcn.0043e4ba
add esp, 4
mov dword [edi], 0
jmp 0x40cc85
lea eax, [esi + 0xe84]
push eax
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
push 0xfffffffffffffff5
call dword [sym.imp.KERNEL32.dll_GetStdHandle]
mov dword [esp + 0x18], eax
cmp eax, 0xffffffff
je 0x40cc78
lea ecx, [esp + 0x3c]
push ecx
push eax
call dword [sym.imp.KERNEL32.dll_GetConsoleScreenBufferInfo]
test eax, eax
je 0x40cc78
push 5
push dword [esp + 0x1c]
call dword [sym.imp.KERNEL32.dll_SetConsoleTextAttribute]
push str.log4z:_closeLogger_can_not_close__invalide_logger_id___r_n
push 0x467ed4
call fcn.0043f3d8
add esp, 8
push dword [esp + 0x44]
push dword [esp + 0x1c]
call dword [sym.imp.KERNEL32.dll_SetConsoleTextAttribute]
lea eax, [esi + 0xe84]
push eax
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
inc ebx
add edi, 0x88
cmp ebx, dword [esi + 0x78]
jle 0x40cbf0
mov ecx, dword [esp + 0xb0]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x98]
xor ecx, esp
call fcn.0043d8bb
mov esp, ebp
pop ebp
ret