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

Disassembly:
push ebp
mov ebp, esp
push ebx
push edi
push esi
and esp, 0xfffffff8
sub esp, 0x478
mov esi, esp
mov eax, dword [0x4d1028]
mov ebx, ecx
lea edi, [ecx + 8]
mov ecx, edi
xor eax, ebp
mov dword [esi + 0x470], eax
lea eax, [esi + 0x58]
push eax
call fcn.0040d770
mov eax, dword [esi + 0x60]
add eax, dword [esi + 0x58]
cmp byte [0x4d290e], 0
mov dword [esi + 0x1c], eax
je 0x40d245
cmp byte [ebx + 0xb8], 0
je 0x40d245
push dword [ebx + 0xac]
push edi
call fcn.00406d44
add esp, 8
push str.___tTotal_runtime:
push eax
call fcn.00406d44
add esp, 8
cmp byte [0x4d28f8], 0
mov dword [esi + 8], eax
je 0x40d209
lea eax, [esi + 0x58]
mov dword [esi + 0x5c], 0
mov dword [esi + 0x58], 0
push eax
call dword [sym.imp.KERNEL32.dll_QueryPerformanceCounter]
movsd xmm0, qword [0x490720]
fild qword [esi + 0x58]
fstp qword [esi + 0x30]
movsd xmm1, qword [0x490670]
xor edx, edx
fild qword [0x4d28f0]
fstp qword [esi + 0x38]
divsd xmm0, qword [esi + 0x38]
mulsd xmm0, qword [esi + 0x30]
movapd xmm2, xmm0
movapd xmm3, xmm0
cmpltsd xmm2, xmm1
andnpd xmm2, xmm1
subsd xmm3, xmm2
movsd qword [esi + 0x20], xmm3
fld qword [esi + 0x20]
fnstcw word [esi + 0xe]
movzx eax, word [esi + 0xe]
or eax, 0xc00
ucomisd xmm0, xmm1
mov word [esi + 0x1a], ax
setae dl
fldcw word [esi + 0x1a]
shl edx, 0x1f
fistp qword [esi + 0x20]
fldcw word [esi + 0xe]
xor edx, dword [esi + 0x24]
mov eax, dword [esi + 0x20]
jmp 0x40d211
call dword [sym.imp.KERNEL32.dll_GetTickCount]
xor edx, edx
sub eax, dword [ebx + 0xb0]
mov ecx, dword [esi + 8]
sbb edx, dword [ebx + 0xb4]
push edx
push eax
call fcn.0040d850
cmp byte [0x4d28f8], 0
mov ecx, 0x490994
mov edx, 0x490991
cmove edx, ecx
push edx
push eax
call fcn.00406d44
add esp, 8
mov eax, dword [edi]
mov dword [esi + 8], ebx
mov eax, dword [eax + 4]
mov eax, dword [edi + eax + 0x30]
mov ecx, dword [eax + 4]
mov dword [esi + 0x5c], ecx
mov eax, dword [ecx]
call dword [eax + 4]
lea eax, [esi + 0x58]
push eax
call fcn.0040b3a0
add esp, 4
mov edx, dword [eax]
mov ecx, eax
push 0xa
call dword [edx + 0x20]
mov ecx, dword [esi + 0x5c]
mov ebx, eax
test ecx, ecx
je 0x40d28b
mov eax, dword [ecx]
call dword [eax + 8]
test eax, eax
je 0x40d28b
mov edx, dword [eax]
mov ecx, eax
push 1
call dword [edx]
movsx eax, bl
mov ecx, edi
push eax
call fcn.0040ec70
mov ecx, edi
call fcn.0040651e
mov ebx, dword [esi + 8]
lea edi, [esi + 0x458]
lea ecx, [ebx + 0xc]
mov dword [esi + 0x2c], ecx
push edi
call fcn.0040eb80
mov ecx, dword [0x4d28e8]
test ecx, ecx
je 0x40d385
mov eax, esp
mov dword [esi + 4], edi
push eax
sub esp, 0x14
mov edx, dword [esi + 0x468]
cmp dword [esi + 0x46c], 0xf
mov edi, esp
mov dword [edi + 0x10], 0
mov dword [edi + 0x14], 0
jbe 0x40d2f5
mov ebx, edx
mov edx, dword [esi + 0x458]
mov dword [esi + 4], edx
mov edx, ebx
cmp edx, 0xf
mov dword [esi + 0x14], eax
ja 0x40d319
mov eax, dword [esi + 4]
mov ebx, 0xf
movsd xmm0, qword [eax]
movsd xmm1, qword [eax + 8]
movsd qword [edi + 8], xmm1
movsd qword [edi], xmm0
jmp 0x40d374
mov eax, edx
mov ebx, 0x7fffffff
mov dword [esi + 0x10], ecx
mov dword [esi], edx
or eax, 0xf
cmp eax, 0x7fffffff
cmovb ebx, eax
cmp ebx, 0xfff
jb 0x40d351
lea eax, [ebx + 0x24]
push eax
call fcn.0046d61c
add esp, 4
mov ecx, eax
add eax, 0x23
and eax, 0xffffffe0
mov dword [eax - 4], ecx
jmp 0x40d35d
lea eax, [ebx + 1]
push eax
call fcn.0046d61c
add esp, 4
mov ecx, dword [esi]
mov dword [edi], eax
inc ecx
push ecx
push dword [esi + 4]
push eax
call fcn.00471f40
mov edx, dword [esi]
add esp, 0xc
mov ecx, dword [esi + 0x10]
mov dword [edi + 0x10], edx
mov dword [edi + 0x14], ebx
call fcn.0041fc70
mov esp, dword [esi + 0x14]
mov ebx, dword [esi + 8]
mov eax, dword [0x4d2908]
test eax, eax
je 0x40d3b6
lea ecx, [esi + 0x458]
push ecx
push dword [ebx + 0xa0]
push dword [ebx + 0xa8]
push dword [ebx + 0xa4]
push dword [ebx]
call eax
add esp, 0x14
test al, al
jne 0x40d697
test byte [0x4d1008], 2
jne 0x40d3e9
cmp dword [ebx], 2
jl 0x40d453
push 2
call fcn.00473b6f
add esp, 4
mov ecx, dword [esi + 0x468]
cmp dword [esi + 0x46c], 0xf
jbe 0x40d42d
mov edx, dword [esi + 0x458]
jmp 0x40d433
cmp dword [esi + 0x46c], 0xf
lea edi, [esi + 0x458]
mov eax, edi
jbe 0x40d400
mov eax, dword [esi + 0x458]
push eax
call dword [sym.imp.KERNEL32.dll_OutputDebugStringA]
push 2
call fcn.00473b6f
add esp, 4
mov ecx, dword [esi + 0x468]
cmp dword [esi + 0x46c], 0xf
jbe 0x40d426
mov edi, dword [esi + 0x458]
push eax
push 1
push ecx
push edi
jmp 0x40d438
lea edx, [esi + 0x458]
push eax
push 1
push ecx
push edx
call fcn.0047d31e
add esp, 0x10
push 2
call fcn.00473b6f
add esp, 4
push eax
call fcn.0047c282
add esp, 4
test byte [0x4d1008], 1
je 0x40d496
call fcn.0040c760
test al, al
je 0x40d496
mov eax, dword [esi + 0x468]
cmp dword [esi + 0x46c], 0xf
jbe 0x40d47c
mov ecx, dword [esi + 0x458]
jmp 0x40d482
lea ecx, [esi + 0x458]
push 0
lea edx, [esi + 0x58]
push edx
push eax
push ecx
push dword [0x4d2924]
call dword [sym.imp.KERNEL32.dll_WriteFile]
cmp dword [ebx], 3
jne 0x40d697
mov ecx, dword [0x4d4f00]
test ecx, ecx
je 0x40d4cd
mov eax, dword [esi + 0x468]
cmp dword [esi + 0x46c], 0xf
jbe 0x40d4c0
mov edx, dword [esi + 0x458]
jmp 0x40d4c6
lea edx, [esi + 0x458]
push eax
push edx
call fcn.004203d0
cmp dword [esi + 0x46c], 0xf
jbe 0x40d4de
mov eax, dword [esi + 0x458]
jmp 0x40d4e4
lea eax, [esi + 0x458]
push 0x400
push eax
lea edi, [esi + 0x58]
push edi
call fcn.0041ed80
add esp, 0xc
push edi
call fcn.004053f0
add esp, 4
mov eax, dword [0x4d2910]
test eax, eax
je 0x40d578
mov eax, dword [0x4d2910]
cmp eax, 1
ja 0x40d570
push 0x4d2910
call fcn.0040c670
add esp, 4
test al, al
je 0x40d56b
mov dword [0x4d2918], 0
mov dword [0x4d2914], 0
mov dword [0x4d2920], 0
mov dword [0x4d291c], 0
push 0x4d2910
push 0
push 0x4d2914
push 0x4d2910
call fcn.0040c730
add esp, 0x10
mov eax, 0x4d2914
jmp 0x40d570
mov eax, dword [0x4d2910]
mov ecx, dword [eax + 8]
cmp ecx, dword [eax + 0xc]
jne 0x40d582
call fcn.00420680
jmp 0x40d697
mov eax, dword [0x4d2910]
cmp eax, 1
ja 0x40d5ea
push 0x4d2910
call fcn.0040c670
add esp, 4
test al, al
je 0x40d5e5
mov dword [0x4d2918], 0
mov dword [0x4d2914], 0
mov dword [0x4d2920], 0
mov dword [0x4d291c], 0
push 0x4d2910
push 0
push 0x4d2914
push 0x4d2910
call fcn.0040c730
add esp, 0x10
mov eax, 0x4d2914
jmp 0x40d5ea
mov eax, dword [0x4d2910]
mov ecx, dword [eax + 0xc]
test ecx, ecx
jne 0x40d5f4
mov ecx, dword [eax + 4]
mov eax, dword [eax]
lea eax, [eax + ecx*4 - 4]
lea ecx, [esi + 0x44]
push eax
call fcn.0041fc30
mov ecx, dword [esi + 0x44]
test ecx, ecx
je 0x40d68f
cmp dword [esi + 0x46c], 0xf
jbe 0x40d61f
mov edx, dword [esi + 0x458]
jmp 0x40d625
lea edx, [esi + 0x458]
mov eax, dword [esi + 0x1c]
test edx, edx
mov dword [esi + 4], ecx
mov dword [esi + 0x14], edx
lea eax, [edx + eax]
mov dword [esi + 0x10], eax
je 0x40d645
push eax
call fcn.0047e800
add esp, 4
mov dword [esi], eax
jmp 0x40d64b
mov dword [esi], 0
mov ebx, dword [esi + 8]
mov eax, dword [esi + 0x14]
mov edi, dword [esi + 0x1c]
mov ecx, dword [ebx + 0xa0]
mov edx, dword [ebx + 0xa8]
add eax, ecx
sub edi, ecx
mov ecx, dword [ebx + 0xa4]
mov dword [esi + 0x50], eax
mov eax, dword [esi + 0x10]
mov dword [esi + 0x54], edi
lea edi, [esi + 0x50]
mov dword [esi + 0x48], eax
mov eax, dword [esi]
mov dword [esi + 0x4c], eax
lea eax, [esi + 0x48]
push eax
push edi
push edx
push ecx
mov eax, dword [esi + 4]
push eax
call dword [eax + 4]
add esp, 0x14
lea ecx, [esi + 0x44]
call fcn.0041fc10
mov eax, dword [esi + 0x46c]
cmp eax, 0x10
jb 0x40d6d5
mov ecx, dword [esi + 0x458]
lea edi, [eax + 1]
cmp edi, 0x1000
jb 0x40d6cb
mov edx, dword [ecx - 4]
add ecx, 0xfffffffc
sub ecx, edx
cmp ecx, 0x20
jae 0x40d763
add eax, 0x24
mov ecx, edx
mov edi, eax
push edi
push ecx
call fcn.0046d651
add esp, 8
push dword [ebx + 0xbc]
call dword [sym.imp.KERNEL32.dll_SetLastError]
mov eax, dword [ebx + 8]
mov eax, dword [eax + 4]
mov dword [ebx + eax + 8], 0x490a00
mov eax, dword [ebx + 8]
mov eax, dword [eax + 4]
lea ecx, [eax - 0x50]
mov dword [ebx + eax + 4], ecx
mov ecx, dword [esi + 0x2c]
mov dword [ebx + 0xc], 0x490a10
call fcn.0040e540
mov dword [ebx + 0xc], vtable.std::basic_streambuf_char__struct_std::char_traits_char__.0
mov eax, ebx
mov ebx, dword [ebx + 0x40]
lea edi, [eax + 0x58]
test ebx, ebx
je 0x40d73f
mov ecx, dword [ebx + 4]
test ecx, ecx
je 0x40d736
mov eax, dword [ecx]
call dword [eax + 8]
test eax, eax
je 0x40d736
mov edx, dword [eax]
mov ecx, eax
push 1
call dword [edx]
push ebx
call fcn.0046d64c
add esp, 4
mov dword [edi], vtable.std::ios_base.0
push edi
call fcn.0046dc65
add esp, 4
mov ecx, dword [esi + 0x470]
xor ecx, ebp
call fcn.0046d691
lea esp, [ebp - 0xc]
pop esi
pop edi
pop ebx
pop ebp
ret
call fcn.004798ba
int3