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

Disassembly:
push ebp
mov ebp, esp
push ebx
push edi
push esi
sub esp, 0x4c
mov edi, ecx
call fcn.00562bf5
mov eax, dword [eax]
mov dword [ebp - 0x3c], eax
call fcn.00562bf5
xor esi, esi
mov dword [eax], esi
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp - 0x38], eax
push esi
call dword [sym.imp.KERNEL32.dll_SetLastError]
mov eax, dword [edi + 0x3c]
test al, 0x10
mov dword [ebp - 0x10], edi
je 0x40b1d6
mov eax, dword [edi + 0x24]
mov ebx, dword [edi + 0x38]
cmp ebx, eax
jae 0x40aeab
mov dword [edi + 0x38], eax
mov ebx, eax
mov esi, dword [edi + 0x20]
sub ebx, esi
js 0x40b191
cmp ebx, 0x7ffffff8
jae 0x40b1a0
cmp ebx, 0xa
ja 0x40b125
lea eax, [ebp - 0x20]
mov byte [eax + 0xb], bl
lea edi, [eax + ebx]
cmp eax, esi
ja 0x40aee0
cmp edi, esi
ja 0x40b18a
test ebx, ebx
je 0x40aeef
push ebx
push esi
push eax
call fcn.005670c0
add esp, 0xc
mov eax, dword [ebp - 0x10]
lea esi, [eax + 8]
mov byte [edi], 0
movsx eax, byte [ebp - 0x15]
test eax, eax
jns 0x40af03
mov eax, dword [ebp - 0x1c]
mov dword [ebp - 0x30], eax
jns 0x40af13
push dword [ebp - 0x20]
call fcn.00562bc0
add esp, 4
mov eax, dword [esi]
mov eax, dword [eax + 4]
mov ebx, dword [esi + eax + 0x1c]
cmp ebx, 0x648d98
jne 0x40b1a8
mov dword [ebp - 0x34], esi
mov dword [ebp - 0x54], 0x649444
mov eax, dword [0x649444]
cmp eax, 0xffffffff
jne 0x40b250
mov eax, dword [0x649448]
lea edx, [eax - 1]
mov ecx, dword [ebx + 8]
mov esi, dword [ebx + 0xc]
sub esi, ecx
sar esi, 2
cmp esi, edx
jbe 0x40b185
mov edi, dword [ecx + eax*4 - 4]
test edi, edi
je 0x40b185
mov eax, dword [edi]
mov esi, dword [eax + 0x1c]
mov ecx, esi
call dword [0x63e1bc]
mov ecx, edi
push 0xa
call esi
cmp ebx, 0x648d98
jne 0x40b224
movsx eax, al
mov esi, dword [ebp - 0x34]
mov ecx, esi
push eax
call fcn.0040b4e0
mov ecx, esi
call fcn.0040b390
xor eax, eax
dec eax
mov dword [ebp - 0x2c], eax
mov dword [ebp - 0x28], eax
mov dword [ebp - 0x24], eax
mov ecx, dword [ebp - 0x10]
mov eax, dword [ecx + 0x3c]
test al, 0x10
je 0x40b1f1
mov eax, dword [ecx + 0x24]
mov ebx, dword [ecx + 0x38]
cmp ebx, eax
jae 0x40afc4
mov dword [ecx + 0x38], eax
mov ebx, eax
mov esi, dword [ecx + 0x20]
sub ebx, esi
js 0x40b191
cmp ebx, 0x7ffffff8
jae 0x40b1b1
cmp ebx, 0xa
ja 0x40b102
lea eax, [ebp - 0x2c]
mov byte [eax + 0xb], bl
lea edi, [eax + ebx]
cmp eax, esi
ja 0x40aff9
cmp edi, esi
ja 0x40b18a
test ebx, ebx
je 0x40b008
push ebx
push esi
push eax
call fcn.005670c0
add esp, 0xc
mov byte [edi], 0
lea eax, [ebp - 0x20]
lea ebx, [ebp - 0x2c]
lea esi, [ebp - 0x54]
mov ecx, esi
push eax
push 0xffffffffffffffff
mov edi, dword [ebp - 0x10]
push dword [edi + 0x90]
push ebx
call fcn.00544a10
mov eax, dword [edi + 0x94]
mov ecx, dword [edi + 0x98]
mov dword [ebp - 0x48], ecx
mov dword [ebp - 0x44], eax
mov dword [ebp - 0x40], 0x57
mov al, byte [0x6494a3]
test al, al
jne 0x40b275
cmp byte [ebp - 0x49], 0
jns 0x40b05f
push dword [ebp - 0x54]
call fcn.00562bc0
add esp, 4
cmp dword [edi + 4], 3
je 0x40b2a5
mov eax, dword [0x6460b4]
test al, 2
jne 0x40b1b9
test al, 4
jne 0x40b087
test eax, 0xfffffffa
jne 0x40b0c8
cmp dword [edi + 4], 2
jl 0x40b0c8
lea esi, [ebp - 0x2c]
movsx ebx, byte [esi + 0xb]
test ebx, ebx
cmovs ebx, dword [esi + 4]
cmovs esi, dword [esi]
test ebx, ebx
je 0x40b0c8
xor edi, edi
mov eax, ebx
sub eax, edi
lea ecx, [esi + edi]
push eax
push ecx
push 2
call fcn.005645e6
add esp, 0xc
test eax, eax
setns cl
add edi, eax
cmp edi, ebx
setb al
test cl, al
jne 0x40b09d
mov eax, dword [0x6460b4]
mov edi, dword [ebp - 0x10]
test al, 1
jne 0x40b148
cmp dword [edi + 4], 3
je 0x40b20e
cmp byte [ebp - 0x21], 0
jns 0x40b0e7
push dword [ebp - 0x2c]
call fcn.00562bc0
add esp, 4
push dword [ebp - 0x38]
call dword [sym.imp.KERNEL32.dll_SetLastError]
call fcn.00562bf5
mov ecx, dword [ebp - 0x3c]
mov dword [eax], ecx
add esp, 0x4c
pop esi
pop edi
pop ebx
pop ebp
ret
mov edi, ebx
or edi, 7
inc edi
push edi
call fcn.00562bc5
add esp, 4
mov dword [ebp - 0x2c], eax
or edi, 0x80000000
mov dword [ebp - 0x24], edi
mov dword [ebp - 0x28], ebx
jmp 0x40afea
mov edi, ebx
or edi, 7
inc edi
push edi
call fcn.00562bc5
add esp, 4
mov dword [ebp - 0x20], eax
or edi, 0x80000000
mov dword [ebp - 0x18], edi
mov dword [ebp - 0x1c], ebx
jmp 0x40aed1
call fcn.0040ca30
test al, al
je 0x40b0cc
lea eax, [ebp - 0x2c]
movsx ecx, byte [eax + 0xb]
test ecx, ecx
cmovs ecx, dword [eax + 4]
mov dword [ebp - 0x20], 0xffffffff
cmovs eax, dword [eax]
push 0
lea edx, [ebp - 0x20]
push edx
push ecx
push eax
push dword [0x64a794]
call dword [sym.imp.KERNEL32.dll_WriteFile]
jmp 0x40b0cc
call fcn.0058fdd0
push str....._third_partylibc_srcinclude__stringchar_traits.h:145:_assertion__std::__is_pointer_in_range___s1____s1____n____s2__failed:_char_traits::copy:_source_and_destination_ranges_overlap_n
jmp 0x40b196
push str....._third_partylibc_srcinclude_string_view:330:_assertion____end_____begin____0_failed:_std::string_view::string_view_iterator__sentinel__received_invalid_range_n
push 0x622e92
call fcn.0058fdd0
lea ecx, [ebp - 0x20]
call fcn.00593660
lock inc dword [ebx + 4]
jmp 0x40af28
lea ecx, [ebp - 0x2c]
call fcn.00593660
cmp byte [ebp - 0x21], 0
jns 0x40b1c2
mov ebx, dword [ebp - 0x2c]
push ebx
call dword [sym.imp.KERNEL32.dll_OutputDebugStringA]
mov eax, dword [0x6460b4]
mov edi, dword [ebp - 0x10]
jmp 0x40b076
mov ebx, 0
test al, 8
je 0x40aecb
mov eax, dword [ebp - 0x10]
mov esi, dword [eax + 0x14]
mov ebx, dword [eax + 0x1c]
jmp 0x40aeae
xor esi, esi
mov ebx, 0
test al, 8
je 0x40afe4
mov eax, dword [ebp - 0x10]
mov esi, dword [eax + 0x14]
mov ebx, dword [eax + 0x1c]
jmp 0x40afc7
lea eax, [ebp - 0x2c]
mov ecx, edi
mov edx, dword [ebp - 0x30]
push eax
call fcn.005b98f0
add esp, 4
jmp 0x40b0d6
xor ecx, ecx
dec ecx
lock xadd dword [ebx + 4], ecx
test ecx, ecx
jne 0x40af86
mov ecx, dword [ebx]
mov esi, dword [ecx + 4]
mov byte [ebp - 0x11], al
mov ecx, esi
call dword [0x63e1bc]
mov ecx, ebx
call esi
mov al, byte [ebp - 0x11]
jmp 0x40af86
lea eax, [ebp - 0x54]
lea ecx, [ebp - 0x20]
mov dword [ecx], eax
lea eax, [ebp - 0x2c]
mov dword [eax], ecx
push 0x4f1590
push eax
push 0x649444
call fcn.0040a9b0
add esp, 0xc
jmp 0x40af40
movzx ecx, al
lea eax, [ebp - 0x44]
mov dword [ebp - 0x20], eax
lea eax, [ebp - 0x48]
mov dword [ebp - 0x1c], eax
mov dword [ebp - 0x18], esi
lea eax, [ebp - 0x58]
mov dword [eax], str.LogMessage
lea edx, [ebp - 0x40]
lea esi, [ebp - 0x20]
push esi
push eax
call fcn.005b9b70
add esp, 8
jmp 0x40b04e
cmp byte [0x64a7b8], 0
jne 0x40b069
mov byte [0x64a7b8], 1
mov eax, dword [0x64a7c0]
mov ecx, dword [0x64784c]
mov edx, dword fs:[0x2c]
mov ecx, dword [edx + ecx*4]
cmp eax, dword [ecx + 4]
jg 0x40b346
mov ecx, dword [ebp - 0x10]
lea esi, [ebp - 0x20]
push esi
call fcn.005b9840
movsx eax, byte [ebp - 0x15]
mov ecx, esi
test eax, eax
jns 0x40b2f2
mov eax, dword [ebp - 0x1c]
mov ecx, dword [ebp - 0x20]
test eax, eax
js 0x40b332
sete dl
test ecx, ecx
setne dh
or dh, dl
je 0x40b33c
push eax
push ecx
push dword [0x64a7bc]
call fcn.00406f40
add esp, 0xc
cmp byte [ebp - 0x15], 0
jns 0x40b323
push dword [ebp - 0x20]
call fcn.00562bc0
add esp, 4
mov byte [0x64a7b8], 0
mov edi, dword [ebp - 0x10]
jmp 0x40b069
push str....._third_partylibc_srcinclude_string_view:318:_assertion___len___static_cast_size_type__numeric_limits_difference_type_::max____failed:_string_view::string_view__CharT___size_t_:_length_does_not_fit_in_difference_type_n
jmp 0x40b196
push str....._third_partylibc_srcinclude_string_view:320:_assertion___len__0____s___nullptr_failed:_string_view::string_view__CharT___size_t_:_received_nullptr_n
jmp 0x40b196
push 0x64a7c0
call fcn.00562c08
add esp, 4
cmp dword [0x64a7c0], 0xffffffff
jne 0x40b2d6
push 0x400
push str.LOG_FATAL
call fcn.0040b4d0
add esp, 8
mov dword [0x64a7bc], eax
push 0x64a7c0
call fcn.00562c57
add esp, 4
jmp 0x40b2d6