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

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x110
push esi
push edi
mov dword [esp + 0x28], ecx
mov edi, edx
lea ecx, [esp + 0xd0]
mov dword [esp + 0x68], 0x720528
mov dword [esp + 0x78], 0x720520
call fcn.0040d540
push ecx
lea eax, [esp + 0x84]
push eax
lea ecx, [esp + 0x70]
call fcn.0040d420
mov eax, dword [esp + 0x68]
mov eax, dword [eax + 4]
mov dword [esp + eax + 0x68], 0x720530
mov eax, dword [esp + 0x68]
mov ecx, dword [eax + 4]
lea eax, [ecx - 0x68]
mov dword [esp + ecx + 0x64], eax
lea ecx, [esp + 0x80]
call fcn.0040de20
mov edi, dword [edi + 4]
mov dword [esp + 0x80], 0x720534
mov dword [esp + 0xb8], 0
mov dword [esp + 0xbc], 0
mov esi, dword [edi]
cmp esi, edi
je 0x504f1a
nop dword [eax]
lea eax, [esi + 8]
push eax
lea ecx, [esp + 0x38]
call fcn.004141c0
mov eax, dword [esi + 0x20]
lea ecx, [esp + 0x78]
mov edx, str.define
mov dword [esp + 0x4c], eax
call fcn.0040e220
cmp dword [esp + 0x48], 0xf
lea edx, [esp + 0x34]
push dword [esp + 0x44]
cmova edx, dword [esp + 0x38]
mov ecx, eax
call fcn.0040fee0
add esp, 4
mov edx, 0x71e884
mov ecx, eax
call fcn.0040e220
mov ecx, dword [esp + 0x4c]
mov dword [esp + 0x18], ecx
lea ecx, [esp + 0x1c]
push eax
mov dword [esp + 0x10], eax
mov dword [esp + 0x14], 0
call fcn.0040c4b0
cmp byte [esp + 0x20], 0
je 0x504e51
mov edx, dword [esp + 0xc]
mov ecx, dword [edx]
mov eax, dword [ecx + 4]
mov eax, dword [eax + edx + 0x30]
mov ecx, dword [eax + 4]
mov dword [esp + 0x24], ecx
mov dword [esp + 0x54], ecx
mov eax, dword [ecx]
call dword [eax + 4]
lea eax, [esp + 0x50]
push eax
call fcn.0042a8f0
mov ecx, dword [esp + 0x28]
add esp, 4
mov dword [esp + 0x14], eax
test ecx, ecx
je 0x504e0c
mov edx, dword [ecx]
mov edx, dword [edx + 8]
call edx
test eax, eax
je 0x504e0c
mov edx, dword [eax]
mov ecx, eax
push 1
call dword [edx]
mov ecx, dword [esp + 0xc]
push dword [esp + 0x18]
mov edx, dword [esp + 0x18]
mov byte [esp + 0x5c], 0
mov eax, dword [ecx]
mov edx, dword [edx]
add ecx, dword [eax + 4]
movzx eax, byte [ecx + 0x40]
push eax
push ecx
push dword [ecx + 0x38]
mov ecx, dword [esp + 0x24]
lea eax, [esp + 0x3c]
push dword [esp + 0x68]
push eax
call dword [edx + 0x20]
mov eax, dword [esp + 0x10]
mov ecx, 4
cmp byte [esp + 0x2c], al
cmovne eax, ecx
mov dword [esp + 0x10], eax
mov edx, dword [esp + 0xc]
mov eax, dword [edx]
mov ecx, dword [eax + 4]
mov eax, 4
add ecx, edx
xor edx, edx
cmp dword [ecx + 0x38], edx
cmovne eax, edx
or eax, dword [ecx + 0xc]
or eax, dword [esp + 0x10]
and eax, 0x17
mov dword [ecx + 0xc], eax
mov ecx, dword [ecx + 0x10]
and ecx, eax
jne 0x504f3c
mov ecx, dword [esp + 0x1c]
mov eax, dword [ecx]
mov eax, dword [eax + 4]
cmp dword [eax + ecx + 0xc], edx
jne 0x504ebe
test byte [eax + ecx + 0x14], 2
je 0x504ebe
mov ecx, dword [eax + ecx + 0x38]
mov eax, dword [ecx]
mov eax, dword [eax + 0x34]
call eax
cmp eax, 0xffffffff
jne 0x504eba
mov edx, dword [esp + 0x1c]
push ecx
push 4
mov eax, dword [edx]
mov ecx, dword [eax + 4]
add ecx, edx
call fcn.0040d3b0
mov ecx, dword [esp + 0x1c]
mov eax, dword [ecx]
mov eax, dword [eax + 4]
mov ecx, dword [eax + ecx + 0x38]
test ecx, ecx
je 0x504ed0
mov eax, dword [ecx]
call dword [eax + 8]
mov ecx, dword [esp + 0xc]
mov edx, 0x71fc20
call fcn.0040e220
mov ecx, dword [esp + 0x48]
cmp ecx, 0xf
jbe 0x504f10
mov edx, dword [esp + 0x34]
inc ecx
mov eax, edx
cmp ecx, 0x1000
jb 0x504f06
mov edx, dword [eax - 4]
add ecx, 0x23
sub eax, edx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x504f79
push ecx
push edx
call fcn.005ab85c
add esp, 8
mov esi, dword [esi]
cmp esi, edi
jne 0x504d50
mov esi, dword [esp + 0x28]
lea ecx, [esp + 0x80]
push esi
call fcn.0040d4a0
lea ecx, [esp + 0x68]
call fcn.00404ea0
pop edi
mov eax, esi
pop esi
mov esp, ebp
pop ebp
ret
test cl, 4
je 0x504f48
mov esi, str.ios_base::badbit_set
jmp 0x504f58
test cl, 2
mov esi, str.ios_base::failbit_set
mov eax, str.ios_base::eofbit_set
cmove esi, eax
lea eax, [esp + 0x2c]
push 1
push eax
call fcn.00410fb0
add esp, 8
lea ecx, [esp + 0x58]
push eax
push esi
call fcn.00410e20
mov ecx, eax
call fcn.00414450
call fcn.005c695f
int3