Function at 0x497aa0
Capabilities:
Resolve function by parsing pe exports

Disassembly:
push ebp
push edi
push esi
push ebx
sub esp, 0x5c
lea edi, [esp + 0x1c]
mov esi, dword [esp + 0x74]
mov dword [esp + 0x10], ecx
mov dword [esp], edi
mov dword [esp + 0x14], esi
mov dword [esp + 0x34], dbg.__gxx_personality_sj0
mov dword [esp + 0x38], 0x510650
mov dword [esp + 0x3c], ebp
mov dword [esp + 0x40], 0x497ca7
mov dword [esp + 0x44], esp
call dbg._Unwind_SjLj_Register
mov eax, dword [esp + 0x10]
mov ecx, dword [esp + 0x70]
mov byte [eax], 0
mov eax, dword [esp + 0x70]
mov eax, dword [eax]
add ecx, dword [eax - 0xc]
mov eax, dword [ecx + 0x14]
test eax, eax
jne 0x497bae
mov eax, dword [ecx + 0x70]
test eax, eax
je 0x497be0
mov ecx, eax
mov dword [esp + 0x20], 1
call dbg.std::ostream::flush()
mov eax, dword [esp + 0x70]
mov ecx, dword [esp + 0x70]
mov eax, dword [eax]
add ecx, dword [eax - 0xc]
cmp byte [esp + 0x14], 0
jne 0x497ba7
test byte [ecx + 0xd], 0x10
je 0x497ba7
mov esi, dword [ecx + 0x78]
mov dword [esp + 0x14], esi
mov eax, dword [esi + 8]
cmp eax, dword [esi + 0xc]
jae 0x497c68
mov esi, dword [ecx + 0x7c]
movzx eax, byte [eax]
mov dword [esp + 0x18], esi
test esi, esi
je 0x497c9a
mov edi, dword [esp + 0x18]
movzx eax, al
mov edx, dword [edi + 0x18]
test byte [edx + eax*2], 0x20
je 0x497b9a
mov ebx, dword [esp + 0x14]
mov eax, dword [ebx + 8]
mov edx, dword [ebx + 0xc]
cmp eax, edx
jae 0x497c08
add eax, 1
mov dword [ebx + 8], eax
cmp eax, edx
jae 0x497c30
mov edi, dword [esp + 0x18]
movzx eax, byte [eax]
mov edx, dword [edi + 0x18]
movzx eax, al
test byte [edx + eax*2], 0x20
jne 0x497b67
mov eax, dword [esp + 0x70]
mov ecx, dword [esp + 0x70]
mov eax, dword [eax]
add ecx, dword [eax - 0xc]
mov eax, dword [ecx + 0x14]
test eax, eax
je 0x497bf8
or eax, 4
mov dword [esp + 0x20], 0xffffffff
mov dword [esp], eax
call dbg.std::basic_ios<char, std::char_traits<char> >::clear(std::_Ios_Iostate)
sub esp, 4
lea eax, [esp + 0x1c]
mov dword [esp], eax
call sym.__Unwind_SjLj_Unregister
add esp, 0x5c
pop ebx
pop esi
pop edi
pop ebp
ret 8
cmp byte [esp + 0x14], 0
jne 0x497bf8
test byte [ecx + 0xd], 0x10
jne 0x497b32
lea esi, [esi]
mov eax, dword [esp + 0x10]
mov byte [eax], 1
jmp 0x497bc4
mov eax, dword [ebx]
mov ecx, ebx
mov eax, dword [eax + 0x28]
mov dword [esp + 0x20], 1
call eax
cmp eax, 0xffffffff
je 0x497c4c
mov edi, dword [esp + 0x14]
mov eax, dword [edi + 8]
mov edx, dword [edi + 0xc]
jmp 0x497b7f
mov ecx, dword [esp + 0x14]
mov eax, dword [ecx]
mov eax, dword [eax + 0x24]
mov dword [esp + 0x20], 1
call eax
cmp eax, 0xffffffff
jne 0x497b57
mov eax, dword [esp + 0x70]
mov ecx, dword [esp + 0x70]
mov eax, dword [eax]
add ecx, dword [eax - 0xc]
mov eax, dword [ecx + 0x14]
or eax, 2
jmp 0x497bae
mov eax, dword [esi]
mov ecx, esi
mov eax, dword [eax + 0x24]
mov dword [esp + 0x20], 1
call eax
mov esi, dword [esp + 0x70]
mov edx, dword [esi]
mov ecx, dword [edx - 0xc]
add ecx, esi
mov esi, dword [ecx + 0x7c]
mov dword [esp + 0x18], esi
test esi, esi
je 0x497c9a
cmp eax, 0xffffffff
jne 0x497b57
jmp 0x497c59
mov dword [esp + 0x20], 1
call dbg.std::__throw_bad_cast()
mov eax, dword [esp + 0x24]
mov edx, dword [esp + 0x28]
mov dword [esp + 0x14], eax
mov eax, dword [esp + 0x20]
test eax, eax
jne 0x497cf4
mov eax, dword [esp + 0x14]
sub edx, 1
mov dword [esp], eax
jne 0x497d12
call dbg.__cxa_begin_catch
mov eax, dword [esp + 0x70]
mov esi, dword [esp + 0x70]
mov eax, dword [eax]
add esi, dword [eax - 0xc]
or dword [esi + 0x14], 1
test byte [esi + 0x10], 1
mov dword [esp + 0x20], 2
je 0x497d73
call dbg.__cxa_rethrow
sub eax, 1
jne 0x497d4d
call dbg.__cxa_end_catch
mov eax, dword [esp + 0x14]
mov dword [esp + 0x20], 0xffffffff
mov dword [esp], eax
call dbg._Unwind_SjLj_Resume
call dbg.__cxa_begin_catch
mov eax, dword [esp + 0x70]
mov esi, dword [esp + 0x70]
mov eax, dword [eax]
add esi, dword [eax - 0xc]
or dword [esi + 0x14], 1
test byte [esi + 0x10], 1
je 0x497d3b
mov dword [esp + 0x20], 3
call dbg.__cxa_rethrow
mov dword [esp + 0x20], 0xffffffff
call dbg.__cxa_end_catch
jmp 0x497b9a
sub eax, 1
jne 0x497d71
xor eax, eax
mov dword [esp + 0x20], eax
call dbg.__cxa_end_catch
mov eax, dword [esp + 0x14]
mov dword [esp + 0x20], 0xffffffff
mov dword [esp], eax
call dbg._Unwind_SjLj_Resume
ud2
call dbg.__cxa_rethrow
nop
nop
nop
nop
nop
nop
nop
nop
push ebp
push edi
push esi
push ebx
sub esp, 0x5c
lea edi, [esp + 0x1c]
mov esi, dword [esp + 0x74]
mov dword [esp + 0x10], ecx
mov dword [esp], edi
mov dword [esp + 0x14], esi
mov dword [esp + 0x34], dbg.__gxx_personality_sj0
mov dword [esp + 0x38], 0x510638
mov dword [esp + 0x3c], ebp
mov dword [esp + 0x40], 0x497f87
mov dword [esp + 0x44], esp
call dbg._Unwind_SjLj_Register
mov eax, dword [esp + 0x10]
mov ecx, dword [esp + 0x70]
mov byte [eax], 0
mov eax, dword [esp + 0x70]
mov eax, dword [eax]
add ecx, dword [eax - 0xc]
mov eax, dword [ecx + 0x14]
test eax, eax
jne 0x497e8e
mov eax, dword [ecx + 0x70]
test eax, eax
je 0x497ec0
mov ecx, eax
mov dword [esp + 0x20], 1
call dbg.std::ostream::flush()
mov eax, dword [esp + 0x70]
mov ecx, dword [esp + 0x70]
mov eax, dword [eax]
add ecx, dword [eax - 0xc]
cmp byte [esp + 0x14], 0
jne 0x497e87
test byte [ecx + 0xd], 0x10
je 0x497e87
mov esi, dword [ecx + 0x78]
mov dword [esp + 0x14], esi
mov eax, dword [esi + 8]
cmp eax, dword [esi + 0xc]
jae 0x497f48
mov esi, dword [ecx + 0x7c]
movzx eax, byte [eax]
mov dword [esp + 0x18], esi
test esi, esi
je 0x497f7a
mov edi, dword [esp + 0x18]
movzx eax, al
mov edx, dword [edi + 0x18]
test byte [edx + eax*2], 0x20
je 0x497e7a
mov ebx, dword [esp + 0x14]
mov eax, dword [ebx + 8]
mov edx, dword [ebx + 0xc]
cmp eax, edx
jae 0x497ee8
add eax, 1
mov dword [ebx + 8], eax
cmp eax, edx
jae 0x497f10
mov edi, dword [esp + 0x18]
movzx eax, byte [eax]
mov edx, dword [edi + 0x18]
movzx eax, al
test byte [edx + eax*2], 0x20
jne 0x497e47
mov eax, dword [esp + 0x70]
mov ecx, dword [esp + 0x70]
mov eax, dword [eax]
add ecx, dword [eax - 0xc]
mov eax, dword [ecx + 0x14]
test eax, eax
je 0x497ed8
or eax, 4
mov dword [esp + 0x20], 0xffffffff
mov dword [esp], eax
call dbg.std::basic_ios<char, std::char_traits<char> >::clear(std::_Ios_Iostate)
sub esp, 4
lea eax, [esp + 0x1c]
mov dword [esp], eax
call sym.__Unwind_SjLj_Unregister
add esp, 0x5c
pop ebx
pop esi
pop edi
pop ebp
ret 8
cmp byte [esp + 0x14], 0
jne 0x497ed8
test byte [ecx + 0xd], 0x10
jne 0x497e12
lea esi, [esi]
mov eax, dword [esp + 0x10]
mov byte [eax], 1
jmp 0x497ea4
mov eax, dword [ebx]
mov ecx, ebx
mov eax, dword [eax + 0x28]
mov dword [esp + 0x20], 1
call eax
cmp eax, 0xffffffff
je 0x497f2c
mov edi, dword [esp + 0x14]
mov eax, dword [edi + 8]
mov edx, dword [edi + 0xc]
jmp 0x497e5f
mov ecx, dword [esp + 0x14]
mov eax, dword [ecx]
mov eax, dword [eax + 0x24]
mov dword [esp + 0x20], 1
call eax
cmp eax, 0xffffffff
jne 0x497e37
mov eax, dword [esp + 0x70]
mov ecx, dword [esp + 0x70]
mov eax, dword [eax]
add ecx, dword [eax - 0xc]
mov eax, dword [ecx + 0x14]
or eax, 2
jmp 0x497e8e
mov eax, dword [esi]
mov ecx, esi
mov eax, dword [eax + 0x24]
mov dword [esp + 0x20], 1
call eax
mov esi, dword [esp + 0x70]
mov edx, dword [esi]
mov ecx, dword [edx - 0xc]
add ecx, esi
mov esi, dword [ecx + 0x7c]
mov dword [esp + 0x18], esi
test esi, esi
je 0x497f7a
cmp eax, 0xffffffff
jne 0x497e37
jmp 0x497f39
mov dword [esp + 0x20], 1
call dbg.std::__throw_bad_cast()
mov eax, dword [esp + 0x24]
mov edx, dword [esp + 0x28]
mov dword [esp + 0x14], eax
mov eax, dword [esp + 0x20]
test eax, eax
jne 0x497fd4
mov eax, dword [esp + 0x14]
sub edx, 1
mov dword [esp], eax
jne 0x497ff2
call dbg.__cxa_begin_catch
mov eax, dword [esp + 0x70]
mov esi, dword [esp + 0x70]
mov eax, dword [eax]
add esi, dword [eax - 0xc]
or dword [esi + 0x14], 1
test byte [esi + 0x10], 1
mov dword [esp + 0x20], 2
je 0x498053
call dbg.__cxa_rethrow
sub eax, 1
jne 0x49802d
call dbg.__cxa_end_catch
mov eax, dword [esp + 0x14]
mov dword [esp + 0x20], 0xffffffff
mov dword [esp], eax
call dbg._Unwind_SjLj_Resume
call dbg.__cxa_begin_catch
mov eax, dword [esp + 0x70]
mov esi, dword [esp + 0x70]
mov eax, dword [eax]
add esi, dword [eax - 0xc]
or dword [esi + 0x14], 1
test byte [esi + 0x10], 1
je 0x49801b
mov dword [esp + 0x20], 3
call dbg.__cxa_rethrow
mov dword [esp + 0x20], 0xffffffff
call dbg.__cxa_end_catch
jmp 0x497e7a
sub eax, 1
jne 0x498051
xor eax, eax
mov dword [esp + 0x20], eax
call dbg.__cxa_end_catch
mov eax, dword [esp + 0x14]
mov dword [esp + 0x20], 0xffffffff
mov dword [esp], eax
call dbg._Unwind_SjLj_Resume
ud2
call dbg.__cxa_rethrow
nop
nop
nop
nop
nop
nop
nop
nop