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

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
push 0xffffffffffffffff
push 0x48dca3
mov eax, dword fs:[0]
push eax
sub esp, 0xa8
push ebx
push esi
push edi
mov eax, dword [0x4ace70]
xor eax, esp
push eax
lea eax, [esp + 0xb8]
mov dword fs:[0], eax
mov edi, dword [ebp + 0x14]
push 1
push edi
lea ecx, [esp + 0x3c]
call fcn.00423150
mov eax, dword [ebp + 0x18]
mov ebx, dword [ebp + 0xc]
mov dword [esp + 0xc0], 0
mov edx, dword [esp + 0x3c]
push eax
mov eax, dword [edx + 4]
lea edx, [esp + eax + 0x40]
lea ecx, [ebx + 0x3c]
push edx
call fcn.004268e0
mov eax, dword [esp + 0x3c]
mov eax, dword [eax + 4]
mov esi, dword [esp + eax + 0x4c]
mov ecx, esi
mov dword [esp + 0x20], esi
mov esi, dword [esp + eax + 0x54]
shr ecx, 8
and cl, 1
mov dword [esp + 0x28], esi
je 0x421201
mov byte [esp + 0x17], 1
test esi, esi
jne 0x421206
mov byte [esp + 0x17], 0
mov ecx, dword [ebp + 0x10]
push 0xffffffffffffffff
push 0
call fcn.0040f4f0
cmp byte [esp + 0x17], 0
jne 0x421319
test esi, esi
jle 0x421233
mov edx, dword [esp + 0x3c]
mov eax, dword [edx + 4]
lea eax, [esp + eax + 0x3c]
mov dword [eax + 0x18], 0
mov eax, dword [ebp + 8]
push eax
lea ecx, [esp + 0x40]
push ecx
call fcn.0042a440
mov edx, dword [edi + 0x14]
mov ecx, dword [edx]
add esp, 8
xor esi, esi
test byte [ebx + 0x60], 2
mov dword [esp + 0x18], ecx
je 0x4212ae
mov eax, dword [edi + 0x24]
mov eax, dword [eax]
sub eax, ecx
test eax, 0xfffffffe
je 0x421299
mov ecx, dword [esp + 0x3c]
mov ecx, dword [ecx + 4]
push 0x2b
lea ecx, [esp + ecx + 0x40]
call fcn.00411340
mov edx, dword [esp + 0x18]
cmp word [edx], ax
je 0x4212ae
mov eax, dword [esp + 0x3c]
mov ecx, dword [eax + 4]
push 0x2d
lea ecx, [esp + ecx + 0x40]
call fcn.00411340
mov ecx, dword [esp + 0x18]
cmp word [ecx], ax
je 0x4212ae
mov edx, dword [esp + 0x3c]
mov ecx, dword [edx + 4]
push 0x20
lea ecx, [esp + ecx + 0x40]
call fcn.00411340
movzx esi, ax
mov eax, dword [edi + 0x24]
mov eax, dword [eax]
mov ecx, dword [edi + 0x14]
sub eax, dword [ecx]
mov ecx, dword [ebx + 0x5c]
sar eax, 1
xor edx, edx
test si, si
setne dl
mov dword [esp + 0x1c], eax
sub ecx, edx
cmp eax, ecx
mov dword [esp + 0x24], ecx
lea eax, [esp + 0x1c]
jb 0x4212db
lea eax, [esp + 0x24]
mov ecx, dword [esp + 0x3c]
mov edx, dword [ecx + 4]
movzx ecx, word [esp + edx + 0x6c]
mov edx, dword [ebx + 0x60]
mov eax, dword [eax]
shr edx, 2
and dl, 1
movzx edx, dl
push edx
mov edx, dword [esp + 0x24]
push esi
push edx
mov edx, dword [esp + 0x24]
push ecx
mov ecx, dword [esp + 0x38]
push ecx
push eax
mov eax, dword [ebp + 0x10]
push edx
push eax
call fcn.00426b40
add esp, 0x20
jmp 0x4215d2
mov ecx, dword [ebp + 8]
push ecx
lea edx, [esp + 0x40]
push edx
call fcn.0042a440
mov eax, dword [edi + 0x14]
mov ebx, dword [eax]
mov ecx, dword [edi + 0x24]
mov eax, dword [ecx]
mov edx, dword [ebp + 0xc]
mov esi, eax
sub esi, ebx
add esp, 8
sar esi, 1
test byte [edx + 0x60], 2
mov byte [esp + 0x17], 0
je 0x421387
mov ecx, dword [edi + 0x14]
sub eax, dword [ecx]
test eax, 0xfffffffe
je 0x421382
mov edx, dword [esp + 0x3c]
mov ecx, dword [edx + 4]
push 0x2b
lea ecx, [esp + ecx + 0x40]
call fcn.00411340
cmp word [ebx], ax
je 0x421387
mov eax, dword [esp + 0x3c]
mov ecx, dword [eax + 4]
push 0x2d
lea ecx, [esp + ecx + 0x40]
call fcn.00411340
cmp word [ebx], ax
je 0x421387
mov byte [esp + 0x17], 1
mov eax, dword [esp + 0x28]
cmp esi, eax
jne 0x4213ad
mov ecx, dword [ebp + 0xc]
cmp eax, dword [ecx + 0x5c]
jg 0x4213ad
cmp byte [esp + 0x17], 0
jne 0x4213ad
mov ecx, dword [ebp + 0x10]
push esi
push ebx
call fcn.0040d290
jmp 0x4215d2
push esi
push ebx
mov ebx, dword [ebp + 0x10]
mov ecx, ebx
call fcn.0040d290
mov ecx, edi
call fcn.00426ac0
push 1
push edi
lea ecx, [esp + 0x7c]
call fcn.00423150
mov edx, dword [ebp + 0x18]
mov byte [esp + 0xc0], 1
mov eax, dword [esp + 0x7c]
mov ecx, dword [eax + 4]
push edx
lea edx, [esp + ecx + 0x80]
mov ecx, dword [ebp + 0xc]
push edx
add ecx, 0x3c
call fcn.004268e0
cmp byte [esp + 0x17], 0
mov eax, dword [esp + 0x7c]
mov eax, dword [eax + 4]
lea eax, [esp + eax + 0x7c]
mov dword [eax + 0x18], 0
je 0x42141a
lea ecx, [esp + 0x7c]
push 0x20
push ecx
call fcn.00426c50
add esp, 8
mov edx, dword [ebp + 8]
push edx
lea eax, [esp + 0x80]
push eax
call fcn.0042a440
mov ecx, dword [edi + 0x24]
mov eax, dword [ecx]
mov edx, dword [edi + 0x14]
sub eax, dword [edx]
add esp, 8
test eax, 0xfffffffe
jne 0x42145c
mov eax, dword [ebp + 0xc]
test byte [eax + 0x60], 2
je 0x42145c
lea ecx, [esp + 0x7c]
push 0x20
push ecx
mov byte [esp + 0x1f], 1
call fcn.00426c50
add esp, 8
mov edx, dword [edi + 0x14]
mov eax, dword [edi + 0x24]
mov eax, dword [eax]
mov edx, dword [edx]
mov ecx, dword [ebp + 0xc]
mov ecx, dword [ecx + 0x5c]
sub eax, edx
sar eax, 1
mov dword [esp + 0x1c], eax
cmp eax, ecx
mov dword [esp + 0x24], edx
mov dword [esp + 0x20], ecx
lea eax, [esp + 0x1c]
jb 0x421488
lea eax, [esp + 0x20]
mov eax, dword [eax]
mov dword [esp + 0x18], eax
cmp dword [esp + 0x28], eax
ja 0x4214a2
push eax
push edx
mov ecx, ebx
call fcn.0040d290
jmp 0x42156e
mov dl, byte [esp + 0x17]
xor ecx, ecx
test dl, dl
setne cl
add esi, ecx
cmp eax, esi
mov dword [esp + 0x1c], esi
lea eax, [esp + 0x18]
jb 0x4214bf
lea eax, [esp + 0x1c]
mov eax, dword [eax]
mov dword [esp + 0x1c], eax
movzx eax, dl
mov esi, eax
mov dword [esp + 0x30], eax
cmp esi, dword [esp + 0x1c]
jae 0x421523
sub eax, ecx
lea ecx, [eax + eax]
mov dword [esp + 0x2c], eax
mov dword [esp + 0x20], ecx
mov edx, dword [esp + 0x2c]
cmp edx, dword [ebx + 0x14]
jbe 0x4214ef
call fcn.00469f76
cmp dword [ebx + 0x18], 8
jb 0x4214fa
mov eax, dword [ebx + 4]
jmp 0x4214fd
lea eax, [ebx + 4]
mov ecx, dword [esp + 0x24]
mov dx, word [ecx + esi*2]
mov ecx, dword [esp + 0x20]
cmp dx, word [eax + ecx]
jne 0x42151f
inc dword [esp + 0x2c]
add dword [esp + 0x20], 2
inc esi
cmp esi, dword [esp + 0x1c]
jb 0x4214e1
mov eax, dword [esp + 0x30]
cmp esi, dword [esp + 0x18]
jb 0x42152b
mov esi, eax
mov edx, dword [esp + 0x24]
push esi
push edx
mov ecx, ebx
call fcn.0040d290
mov ecx, dword [esp + 0x7c]
mov edx, dword [ecx + 4]
movzx ecx, word [esp + edx + 0xac]
mov eax, dword [esp + 0x28]
sub eax, dword [esp + 0x18]
push ecx
push eax
mov ecx, ebx
call fcn.004153a0
mov eax, dword [esp + 0x18]
sub eax, esi
push eax
mov eax, dword [esp + 0x28]
lea ecx, [eax + esi*2]
push ecx
mov ecx, ebx
call fcn.0040f3d0
mov byte [esp + 0xc0], 0
mov edx, dword [esp + 0x7c]
mov eax, dword [edx + 4]
mov dword [esp + eax + 0x7c], vtable.std::basic_ostream_wchar_t__struct_std::char_traits_wchar_t__.0
mov esi, dword [esp + 0x78]
test esi, esi
je 0x4215b7
lea ecx, [esi + 4]
or edx, 0xffffffff
lock xadd dword [ecx], edx
jne 0x4215b7
mov eax, dword [esi]
mov edx, dword [eax + 4]
mov ecx, esi
call edx
lea eax, [esi + 8]
or ecx, 0xffffffff
lock xadd dword [eax], ecx
jne 0x4215b7
mov edx, dword [esi]
mov eax, dword [edx + 8]
mov ecx, esi
call eax
lea ecx, [esp + 0x80]
push ecx
mov dword [esp + 0x84], vtable.std::ios_base.0
call fcn.0046880a
add esp, 4
mov ecx, edi
call fcn.00426ac0
mov dword [esp + 0xc0], 0xffffffff
mov edx, dword [esp + 0x3c]
mov eax, dword [edx + 4]
mov dword [esp + eax + 0x3c], vtable.std::basic_ostream_wchar_t__struct_std::char_traits_wchar_t__.0
mov esi, dword [esp + 0x38]
test esi, esi
je 0x421625
lea ecx, [esi + 4]
or edx, 0xffffffff
lock xadd dword [ecx], edx
jne 0x421625
mov eax, dword [esi]
mov edx, dword [eax + 4]
mov ecx, esi
call edx
lea eax, [esi + 8]
or ecx, 0xffffffff
lock xadd dword [eax], ecx
jne 0x421625
mov edx, dword [esi]
mov eax, dword [edx + 8]
mov ecx, esi
call eax
lea ecx, [esp + 0x40]
push ecx
mov dword [esp + 0x44], vtable.std::ios_base.0
call fcn.0046880a
add esp, 4
mov ecx, dword [esp + 0xb8]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret