Function at 0x405720
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x40
mov eax, dword [section..data]
xor eax, ebp
mov dword [ebp - 8], eax
mov eax, dword [ebp + 8]
mov edx, 1
push ebx
push esi
mov esi, ecx
mov dword [ebp - 0x2c], eax
mov eax, dword [ebp + 0xc]
mov ecx, str.ErrorLevel
push edi
mov dword [ebp - 0x34], eax
call fcn.00402420
test eax, eax
je 0x405ad1
jmp 0x405760
cmp eax, esi
jg 0x405ad1
call fcn.0040b6f0
add eax, 0xb6109100
push 0
push 0x989680
adc edx, 2
push edx
push eax
call fcn.00425ac0
mov dword [ebp - 0x14], edx
mov dword [ebp - 0x18], eax
mov dword [ebp - 0x10], 0xa
call fcn.00407de0
push 0x112
push 0xc
push eax
call dword [sym.imp.ntdll.dll_RtlAllocateHeap]
mov ebx, eax
mov dword [ebp - 0x30], ebx
lea eax, [ebx + 4]
lock inc dword [eax]
lea edi, [ebx + 8]
mov dword [ebx], 0
lea ecx, [edi + 8]
mov dword [edi], 0x100
xor eax, eax
mov dword [edi + 4], ecx
push 0x80
mov word [ecx], ax
lea eax, [ebp - 0x10]
push ecx
push eax
lea eax, [ebp - 0x18]
push eax
call dword [sym.imp.SHLWAPI.dll_SHFormatDateTimeW]
nop
test eax, eax
je 0x405803
mov edx, dword [edi]
add eax, eax
cmp edx, eax
cmovae edx, eax
mov eax, dword [edi + 4]
test dl, 1
lea ecx, [edx + 1]
cmove ecx, edx
xor edx, edx
mov dword [edi], ecx
mov word [ecx + eax], dx
jmp 0x40583b
or eax, 0xffffffff
lea ecx, [ebx + 4]
lock xadd dword [ecx], eax
add eax, 0xffffffff
jne 0x405839
mov ebx, dword [ebx]
test ebx, ebx
je 0x405828
push edi
mov ecx, ebx
call dword [0x427534]
call ebx
call fcn.00407de0
push dword [ebp - 0x30]
push 0
push eax
call dword [sym.imp.ntdll.dll_RtlFreeHeap]
xor edi, edi
jmp 0x405840
cmp esi, 5
ja case.default.0x405845
jmp dword [esi*4 + 0x405ae4]
mov esi, str.Disabled
jmp 0x405879
mov esi, str.Debug
jmp 0x405879
mov esi, str.Info
nop
jmp 0x405879
mov esi, str.Warning
jmp 0x405879
mov esi, str.Error
jmp 0x405879
mov esi, str.Critical
jmp 0x405879
xor esi, esi
push 0
push dword [ebp - 0x34]
push dword [ebp - 0x2c]
push esi
push str.__s___s_0x_08X__s_r_n
call fcn.00407640
add esp, 0x14
mov word [ebp - 0xc], 0xfeff
call fcn.004012a0
lea ebx, [ebx]
test al, al
jne 0x405a97
push 0
push 1
push 0x433d34
call dword [sym.imp.ntdll.dll_RtlRunOnceBeginInitialize]
test eax, eax
jns 0x40590b
push 0
push 0
push 0x433d34
call dword [sym.imp.ntdll.dll_RtlRunOnceBeginInitialize]
cmp eax, 0x103
jne 0x40590b
push str._debug.log
push 0x42ce3c
push 0x42d074
push ecx
call fcn.00401b80
add esp, 4
mov eax, dword [eax + 4]
push eax
push 4
call fcn.00408110
add esp, 0x14
mov dword [0x433d2c], eax
push 0
push 0
push 0x433d34
call dword [sym.imp.ntdll.dll_RtlRunOnceComplete]
mov ecx, dword [0x433d2c]
test ecx, ecx
je 0x405a97
lea eax, [ebp - 0x30]
mov edx, 3
push eax
push ecx
mov ecx, dword [ecx + 4]
push 0
push 0
push 0x80
push 1
push 0x40000000
call fcn.00408b20
mov ebx, dword ds:[ebp - 0x30]
cmp eax, 0xc0000035
jne 0x4059a8
push 0
push 0
push 2
lea eax, [ebp - 0xc]
push eax
lea eax, [ebp - 0x20]
push eax
push 0
push 0
push 0
push ebx
call dword [sym.imp.ntdll.dll_NtWriteFile]
mov ecx, 0x7ffffffe
mov eax, str.Level_Date_Function_Code_Description_App_version_OS_version_r_n
cmp word [eax], 0
je 0x40597e
add eax, 2
sub ecx, 1
jne 0x405970
push 0
push 0
lea eax, [ecx + ecx]
mov ecx, 0xfffffffc
sub ecx, eax
lea eax, [ebp - 0x20]
push ecx
push str.Level_Date_Function_Code_Description_App_version_OS_version_r_n
push eax
push 0
push 0
push 0
push ebx
call dword [sym.imp.ntdll.dll_NtWriteFile]
jmp 0x4059c5
test eax, eax
js 0x4059c5
lea eax, [ebp - 0x3c]
mov ecx, ebx
push eax
call fcn.00408ec0
test eax, eax
js 0x4059c5
lea edx, [ebp - 0x3c]
mov ecx, ebx
call fcn.00409150
test ebx, ebx
je 0x405a97
mov eax, dword fs:[0x18]
mov edx, dword fs:[0x18]
mov ebx, dword fs:[0x18]
test edi, edi
je 0x4059f7
cmp dword [edi], 0
je 0x4059f7
mov ecx, dword [edi + 4]
test ecx, ecx
je 0x4059f7
cmp word [ecx], 0
jne 0x4059f9
xor ecx, ecx
mov eax, dword [eax + 0x30]
movzx eax, word [eax + 0xac]
push eax
mov eax, dword [edx + 0x30]
push dword [eax + 0xa8]
mov eax, dword [ebx + 0x30]
push dword [eax + 0xa4]
push 0x42cffc
push 0
push dword [ebp - 0x34]
push dword [ebp - 0x2c]
push ecx
push esi
push str.__s____s____s___0x_08X____s____s____lu._lu_build__u__r_n
call fcn.004076d0
mov esi, dword [ebp - 0x30]
add esp, 0x28
mov ebx, eax
lea eax, [ebp - 0x28]
mov dword [ebp - 0x2c], ebx
push 0
push 0
push dword [ebx]
push dword [ebx + 4]
push eax
push 0
push 0
push 0
push esi
call dword [sym.imp.ntdll.dll_NtWriteFile]
push esi
call dword [sym.imp.ntdll.dll_NtClose]
add ebx, 0xfffffff8
or edx, 0xffffffff
mov ecx, edx
lea eax, [ebx + 4]
lock xadd dword [eax], ecx
lea eax, [ecx - 1]
test eax, eax
jne 0x405a9a
mov esi, dword [ebx]
test esi, esi
je 0x405a88
push dword ds:[ebp - 0x2c]
mov ecx, esi
call dword [0x427534]
call esi
call fcn.00407de0
push ebx
push 0
push eax
call dword [sym.imp.ntdll.dll_RtlFreeHeap]
or edx, 0xffffffff
test edi, edi
je 0x405ad1
lea ebx, [edi - 8]
lea eax, [ebx + 4]
lock xadd dword [eax], edx
lea eax, [edx - 1]
test eax, eax
jne 0x405ad1
mov esi, dword [ebx]
test esi, esi
je 0x405ac2
push edi
mov ecx, esi
call dword [0x427534]
mov edi, edi
call esi
call fcn.00407de0
push ebx
push 0
push eax
call dword [sym.imp.ntdll.dll_RtlFreeHeap]
mov ecx, dword [ebp - 8]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.00414c55
mov esp, ebp
pop ebp
ret 0xc