Function at 0x415940
Capabilities:
Print debug messages
Resolve function by parsing pe exports
Write file on windows

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
push 0xffffffffffffffff
push 0x61e76c
mov eax, dword fs:[0]
push eax
sub esp, 0x138
mov eax, dword [0x6d45e0]
xor eax, esp
mov dword [esp + 0x130], eax
push ebx
push esi
push edi
mov eax, dword [0x6d45e0]
xor eax, esp
push eax
lea eax, [esp + 0x148]
mov dword fs:[0], eax
cmp dword [ebp + 0xc], 0
mov edi, dword [ebp + 8]
je 0x415d4e
call fcn.00405030
xor ecx, ecx
mov edx, eax
test edx, edx
setne cl
test ecx, ecx
jne 0x4159a9
push 0x80004005
call fcn.00404ef0
mov eax, dword [edx]
mov ecx, edx
call dword [eax + 0xc]
add eax, 0x10
mov dword [esp + 0x20], eax
push ecx
lea ecx, [esp + 0x24]
mov dword [esp + 0x154], 0
call fcn.00415390
test byte [edi + 0x10], 1
mov ebx, eax
mov esi, 0x2710
je 0x415a4f
lea eax, [esp + 0x24]
push eax
call dword [sym.imp.KERNEL32.dll_GetLocalTime]
mov esi, ebx
lea ecx, [esi + 2]
lea esp, [esp]
mov ax, word [esi]
add esi, 2
test ax, ax
jne 0x4159f0
sub esi, ecx
sar esi, 1
call dword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
push eax
call dword [sym.imp.KERNEL32.dll_GetCurrentProcessId]
push eax
movzx eax, word [esp + 0x3a]
push eax
movzx eax, word [esp + 0x3c]
push eax
movzx eax, word [esp + 0x3e]
push eax
movzx eax, word [esp + 0x40]
push eax
movzx eax, word [esp + 0x42]
push eax
movzx eax, word [esp + 0x42]
push eax
mov eax, 0x2710
sub eax, esi
push str._02d__02d__02d:_02d:_02d._d___d._d_
push eax
lea eax, [ebx + esi*2]
push eax
call fcn.004153e0
add esp, 0x2c
mov esi, 0x2710
test byte [edi + 0x10], 2
je 0x415abd
mov edx, ebx
lea ecx, [edx + 2]
lea ebx, [ebx]
mov ax, word [edx]
add edx, 2
test ax, ax
jne 0x415a60
mov eax, dword [edi]
sub edx, ecx
sar edx, 1
test eax, eax
jne 0x415a79
xor esi, esi
jmp 0x415a9e
movzx ecx, word [eax]
mov esi, eax
test cx, cx
je 0x415a9e
cmp cx, 0x5c
je 0x415a8f
cmp cx, 0x2f
jne 0x415a92
lea esi, [eax + 2]
movzx ecx, word [eax + 2]
add eax, 2
test cx, cx
jne 0x415a83
push dword [edi + 0xc]
push esi
mov esi, 0x2710
mov eax, esi
sub eax, edx
push str.File:_s_Line:_d
push eax
lea eax, [ebx + edx*2]
push eax
call fcn.004153e0
add esp, 0x14
test byte [edi + 0x10], 4
je 0x415af8
mov ecx, ebx
lea edx, [ecx + 2]
jmp 0x415ad0
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x415ad0
push dword [edi + 4]
sub ecx, edx
mov eax, esi
sar ecx, 1
sub eax, ecx
push 0x69aff8
push eax
lea eax, [ebx + ecx*2]
push eax
call fcn.004153e0
add esp, 0x10
mov ecx, ebx
lea edx, [ecx + 2]
lea ecx, [ecx]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x415b00
sub ecx, edx
lea eax, [ebp + 0x14]
sar ecx, 1
push eax
push dword [ebp + 0x10]
sub esi, ecx
lea ecx, [ebx + ecx*2]
mov edx, esi
call fcn.00415400
mov esi, dword [esp + 0x20]
xor eax, eax
mov word [ebx + 0x4e1e], ax
push dword [esi - 8]
push esi
call fcn.004c4305
add esp, 8
test eax, eax
js 0x415d72
cmp eax, dword [esi - 8]
jg 0x415d72
xor ecx, ecx
mov dword [esi - 0xc], eax
test byte [ebp + 0xc], 1
mov word [esi + eax*2], cx
je 0x415b62
push esi
call dword [sym.imp.KERNEL32.dll_OutputDebugStringW]
mov ax, word [0x69b000]
lea ecx, [esp + 0x34]
mov word [esp + 0x1c], ax
mov al, byte [0x69b002]
push 0xf
push str.C:UsersPublic
mov byte [esp + 0x26], al
mov dword [esp + 0x50], 0xf
mov dword [esp + 0x4c], 0
mov byte [esp + 0x3c], 0
call fcn.00404a10
sub esp, 0x18
mov byte [esp + 0x168], 1
mov ecx, esp
lea eax, [esp + 0x4c]
push 0xffffffffffffffff
push 0
mov dword [ecx + 0x14], 0xf
mov dword [ecx + 0x10], 0
push eax
mov byte [ecx], 0
call fcn.00404890
call fcn.00415710
add esp, 0x18
lea eax, [esp + 0x64]
push eax
call dword [sym.imp.KERNEL32.dll_GetLocalTime]
movzx eax, word [esp + 0x6a]
push eax
movzx eax, word [esp + 0x6a]
push eax
movzx eax, word [esp + 0x6c]
push eax
push str.C:UsersPublicPddBot
lea eax, [esp + 0x84]
push str._s__d__02d__02d.log
push eax
call dword [sym.imp.USER32.dll_wsprintfW]
add esp, 0x18
lea eax, [esp + 0x74]
lea ecx, [esp + 0x4c]
push eax
call fcn.004163f0
mov byte [esp + 0x150], 2
or edi, 0xffffffff
cmp dword [esp + 0x5c], 0
je 0x415cda
push 0x69b07c
lea eax, [esp + 0x78]
mov dword [esp + 0x18], 0
push eax
lea eax, [esp + 0x1c]
push eax
call fcn.004c5f03
add esp, 0xc
cmp dword [esp + 0x14], 0
je 0x415cda
push esi
lea ecx, [esp + 0x1c]
mov dword [esp + 0x1c], 0
call fcn.00416d80
mov byte [esp + 0x150], 3
mov eax, dword [esp + 0x18]
cmp dword [eax - 4], 1
mov ebx, dword [eax - 0xc]
jle 0x415c8a
push ebx
lea ecx, [esp + 0x1c]
call fcn.004061d0
mov eax, dword [esp + 0x18]
push dword [esp + 0x14]
push 1
push ebx
push eax
call fcn.004c5e6c
push dword [esp + 0x24]
lea eax, [esp + 0x30]
push 1
push 2
push eax
call fcn.004c5e6c
push dword [esp + 0x34]
call fcn.004c4de0
mov byte [esp + 0x174], 2
add esp, 0x24
mov edx, dword [esp + 0x18]
mov ecx, edi
add edx, 0xfffffff0
lea eax, [edx + 0xc]
lock xadd dword [eax], ecx
dec ecx
test ecx, ecx
jg 0x415cda
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
cmp dword [esp + 0x60], 8
jb 0x415ced
push dword [esp + 0x4c]
call fcn.004c41b0
add esp, 4
xor eax, eax
mov dword [esp + 0x60], 7
cmp dword [esp + 0x48], 0x10
mov dword [esp + 0x5c], 0
mov word [esp + 0x4c], ax
jb 0x415d17
push dword [esp + 0x34]
call fcn.004c41b0
add esp, 4
add esi, 0xfffffff0
mov dword [esp + 0x48], 0xf
mov dword [esp + 0x44], 0
mov byte [esp + 0x34], 0
mov dword [esp + 0x150], 0xffffffff
lea eax, [esi + 0xc]
lock xadd dword [eax], edi
dec edi
test edi, edi
jg 0x415d4e
mov ecx, dword [esi]
push esi
mov eax, dword [ecx]
call dword [eax + 4]
mov ecx, dword [esp + 0x148]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x130]
xor ecx, esp
call fcn.004c392d
mov esp, ebp
pop ebp
ret
push 0x80070057
call fcn.00404ef0
int3