Function at 0x40bdf0
Capabilities:
Print debug messages
Write file on windows

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x46b980
mov eax, dword fs:[0]
push eax
sub esp, 0x70
mov eax, dword [0x48b378]
xor eax, ebp
mov dword [ebp - 0x14], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov esi, ecx
mov eax, dword [ebp + 8]
xor edi, edi
mov ebx, dword [sym.imp.KERNEL32.dll_InterlockedCompareExchange]
push edi
push 1
push esi
mov dword [ebp - 0x30], eax
mov dword [ebp - 0x34], esi
call ebx
test eax, eax
je 0x40be51
inc edi
cmp edi, 0x64
jbe 0x40be46
push 1
call dword [sym.imp.KERNEL32.dll_Sleep]
push 0
push 1
push esi
call ebx
test eax, eax
jne 0x40be38
mov dword [ebp - 4], 0
mov dword [ebp - 0x18], 0xf
mov dword [ebp - 0x1c], 0
mov byte [ebp - 0x2c], 0
push dword [ebp - 0x30]
lea eax, [ebp - 0x4c]
mov byte [ebp - 4], 1
push eax
mov ecx, esi
call fcn.0040c020
push eax
lea ecx, [ebp - 0x2c]
call fcn.0040c320
lea ecx, [ebp - 0x4c]
call fcn.00407240
mov ecx, dword [ebp - 0x1c]
test ecx, ecx
je 0x40bfe1
cmp dword [esi + 0x30], 0
je 0x40bf02
lea ecx, [ebp - 0x4c]
call fcn.0040ea00
push ecx
mov edx, eax
mov byte [ebp - 4], 2
lea ecx, [ebp - 0x7c]
call fcn.0040e330
add esp, 4
lea ecx, [ebp - 0x2c]
mov byte [ebp - 4], 3
push ecx
mov edx, eax
lea ecx, [ebp - 0x64]
call fcn.0040cb20
add esp, 4
lea ecx, [ebp - 0x2c]
push eax
call fcn.0040c320
lea ecx, [ebp - 0x64]
call fcn.00407240
lea ecx, [ebp - 0x7c]
call fcn.00407240
mov byte [ebp - 4], 1
mov eax, dword [ebp - 0x38]
cmp eax, 8
jb 0x40beff
inc eax
lea ecx, [ebp - 0x4c]
push eax
push dword [ebp - 0x4c]
call fcn.00402430
mov ecx, dword [ebp - 0x1c]
cmp dword [esi + 0x34], 0
je 0x40bf77
test ecx, ecx
je 0x40bfe1
mov edi, dword [ebp - 0x18]
lea eax, [ebp - 0x2c]
mov ebx, dword [ebp - 0x2c]
cmp edi, 0x10
cmovae eax, ebx
cmp byte [ecx + eax - 1], 0xa
je 0x40bf36
cmp edi, 0x10
lea eax, [ebp - 0x2c]
cmovae eax, ebx
cmp byte [ecx + eax - 1], 0xd
jne 0x40bf5d
lea edx, [ecx - 1]
cmp ecx, edx
jb 0x40c015
cmp edi, 0x10
mov dword [ebp - 0x1c], edx
lea eax, [ebp - 0x2c]
cmovae eax, ebx
mov byte [eax + edx], 0
mov ecx, dword [ebp - 0x1c]
test ecx, ecx
jne 0x40bf10
jmp 0x40bfe1
test ecx, ecx
je 0x40bfe1
push 2
push 0x482424
lea ecx, [ebp - 0x2c]
call fcn.0040d760
mov ecx, dword [ebp - 0x1c]
cmp dword [esi + 0x24], 0
je 0x40bf92
cmp dword [ebp - 0x18], 0x10
lea eax, [ebp - 0x2c]
cmovae eax, dword [ebp - 0x2c]
push eax
call dword [sym.imp.KERNEL32.dll_OutputDebugStringA]
mov ecx, dword [ebp - 0x1c]
cmp dword [esi + 0x28], 0
je 0x40bfb4
cmp dword [ebp - 0x18], 0x10
lea eax, [ebp - 0x2c]
cmovae eax, dword [ebp - 0x2c]
push eax
push 0x482428
call fcn.0040d630
mov ecx, dword [ebp - 0x1c]
add esp, 8
cmp dword [esi + 0x2c], 0
je 0x40bfe1
mov edx, dword [esi + 0x1c]
test edx, edx
je 0x40bfe1
cmp dword [ebp - 0x18], 0x10
lea eax, [ebp - 0x2c]
push edx
cmovae eax, dword [ebp - 0x2c]
push ecx
push 1
push eax
call fcn.0045d663
push dword [esi + 0x1c]
call fcn.0045d849
add esp, 0x14
lea ecx, [ebp - 0x2c]
call fcn.00407240
push 0
push esi
call dword [sym.imp.KERNEL32.dll_InterlockedExchange]
mov eax, 1
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x14]
xor ecx, ebp
call fcn.0044e878
mov esp, ebp
pop ebp
ret 4
push str.invalid_string_position
call fcn.0044e18c
int3