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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x560
mov eax, dword [0x4700b0]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
push esi
mov esi, ecx
lea eax, [ebp - 0x464]
push edi
push eax
mov dword [ebp - 0x424], esi
lea ebx, [esi + 8]
mov ecx, ebx
call fcn.004229c0
mov edi, dword [eax + 8]
add edi, dword [eax]
cmp dword [esi], 3
mov dword [ebp - 0x420], edi
jne 0x421288
call fcn.0042a540
test al, al
jne 0x421288
lea ecx, [ebp - 0x560]
call fcn.0042b3d0
push ebx
call fcn.00420f20
add esp, 4
lea ecx, [ebp - 0x560]
push ebx
call fcn.0042b7c0
push ebx
call fcn.00420f20
add esp, 4
lea eax, [ebp - 0x41c]
lea ecx, [esi + 0xc]
push eax
call fcn.0040dac5
mov eax, dword [0x470f28]
test eax, eax
je 0x4212d1
lea ecx, [ebp - 0x41c]
push ecx
push dword [esi + 0xa0]
push dword [esi + 0xa8]
push dword [esi + 0xa4]
push dword [esi]
call eax
add esp, 0x14
test al, al
jne 0x421529
test byte [0x470008], 2
je 0x4212f7
cmp dword [ebp - 0x408], 0x10
lea eax, [ebp - 0x41c]
cmovae eax, dword [ebp - 0x41c]
push eax
call dword [sym.imp.KERNEL32.dll_OutputDebugStringA]
jmp 0x4212fc
cmp dword [esi], 2
jl 0x421343
cmp dword [ebp - 0x408], 0x10
lea edi, [ebp - 0x41c]
mov esi, dword [ebp - 0x40c]
cmovae edi, dword [ebp - 0x41c]
push 2
call fcn.00443a48
push eax
push 1
push esi
push edi
call fcn.00446394
push 2
call fcn.00443a48
push eax
call fcn.00446119
mov edi, dword [ebp - 0x420]
add esp, 0x1c
mov esi, dword [ebp - 0x424]
test byte [0x470008], 1
je 0x421385
call fcn.00421f80
test al, al
je 0x421385
cmp dword [ebp - 0x408], 0x10
lea ecx, [ebp - 0x444]
push 0
push ecx
push dword [ebp - 0x40c]
lea eax, [ebp - 0x41c]
cmovae eax, dword [ebp - 0x41c]
push eax
push dword [0x470f08]
call dword [sym.imp.KERNEL32.dll_WriteFile]
cmp dword [esi], 3
jne 0x421529
mov ecx, dword [0x470f68]
test ecx, ecx
je 0x4213c1
sub esp, 8
lea eax, [ebp - 0x41c]
cmp dword [ebp - 0x408], 0x10
mov edx, esp
cmovae eax, dword [ebp - 0x41c]
mov dword [edx], eax
mov eax, dword [ebp - 0x40c]
mov dword [edx + 4], eax
call fcn.0042b230
mov ecx, 0x400
lea eax, [ebp - 0x41c]
cmp dword [ebp - 0x40c], ecx
cmovb ecx, dword [ebp - 0x40c]
cmp dword [ebp - 0x408], 0x10
cmovae eax, dword [ebp - 0x41c]
test ecx, ecx
je 0x4213fc
push ecx
push eax
lea eax, [ebp - 0x404]
push eax
call fcn.0043f870
add esp, 0xc
lea eax, [ebp - 0x404]
push eax
call fcn.0042b3c0
mov eax, dword [0x470f10]
add esp, 4
sub eax, 0
je 0x421524
sub eax, 1
je 0x421430
cmp dword [0x470f10], 0
sete al
test al, al
jne 0x421524
mov ecx, 0x470f10
call fcn.00421a50
cmp dword [eax + 0x10], 0
je 0x421524
mov ecx, 0x470f10
call fcn.00421a50
mov ecx, eax
call fcn.00422a70
push eax
lea ecx, [ebp - 0x428]
call fcn.0042a200
cmp dword [ebp - 0x428], 0
je 0x421517
cmp dword [ebp - 0x408], 0x10
lea ecx, [ebp - 0x41c]
mov eax, dword [esi + 0xa0]
lea ebx, [ebp - 0x41c]
cmovae ecx, dword [ebp - 0x41c]
cmovae ebx, dword [ebp - 0x41c]
sub edi, eax
lea esi, [eax + ecx]
mov eax, dword [ebp - 0x420]
add eax, ebx
lea ecx, [ebp - 0x44c]
push eax
call fcn.00420f90
mov ecx, dword [eax]
mov dword [ebp - 0x438], ecx
mov eax, dword [eax + 4]
mov dword [ebp - 0x434], eax
mov dword [ebp - 0x440], esi
mov esi, dword [ebp - 0x424]
mov dword [ebp - 0x43c], edi
mov eax, dword [esi + 0xa8]
mov dword [ebp - 0x42c], eax
mov eax, dword [esi + 0xa4]
mov dword [ebp - 0x430], eax
lea eax, [ebp - 0x438]
push eax
lea eax, [ebp - 0x440]
push eax
lea eax, [ebp - 0x42c]
push eax
lea eax, [ebp - 0x430]
push eax
mov eax, dword [ebp - 0x428]
push eax
mov eax, dword [eax + 4]
call eax
add esp, 0x14
lea ebx, [esi + 8]
lea ecx, [ebp - 0x428]
call fcn.0042a310
jmp 0x421529
call fcn.0042a550
mov eax, dword [ebp - 0x408]
cmp eax, 0x10
jb 0x421547
inc eax
lea ecx, [ebp - 0x41c]
push eax
push dword [ebp - 0x41c]
call fcn.00420d40
push dword [esi + 0xac]
call dword [sym.imp.KERNEL32.dll_SetLastError]
lea esi, [ebx + 0x50]
mov ecx, esi
call fcn.0040cf5b
push esi
mov dword [esi], vtable.std::ios_base.0
call fcn.0043c634
mov ecx, dword [ebp - 4]
add esp, 4
xor ecx, ebp
pop edi
pop esi
pop ebx
call fcn.0043dbeb
mov esp, ebp
pop ebp
ret