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

Disassembly:
push 0xffffffffffffffff
push 0x4feaab
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x1e0
push ebx
push ebp
mov ebp, ecx
push esi
push edi
mov eax, dword [ebp + 0xc0]
mov dword [esp + 0x38], eax
mov eax, dword [ebp + 0xbc]
test eax, eax
je 0x4911bf
call fcn.004917a0
jmp 0x491781
call fcn.004b3b50
mov esi, eax
or ecx, 0xffffffff
mov edi, esi
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
push ecx
call fcn.004ed8ee
mov ebx, eax
mov edi, esi
or ecx, 0xffffffff
xor eax, eax
add esp, 4
mov byte [esp + 0x17], al
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
push 2
mov edx, ecx
mov esi, edi
mov edi, ebx
push 0x520014
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
push ebx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
call fcn.004fa3a6
add esp, 4
push eax
call fcn.004ee620
add esp, 0xc
test eax, eax
jne 0x491221
mov byte [esp + 0x17], 1
push ebx
call fcn.004ed4d0
lea eax, [esp + 0x48]
lea ecx, [esp + 0x44]
push eax
push ecx
push 0x32
call fcn.004a9760
mov edx, dword [ebp + 0x40]
xor ecx, ecx
mov eax, dword [edx + 4]
xor edx, edx
mov cx, word [eax + 2]
mov dx, word [eax]
push ecx
add eax, 4
push edx
push eax
mov eax, dword [ebp + 0x58]
push 0
push 0
push eax
push fcn.004d52c0
call fcn.004a97c0
mov ecx, dword [ebp + 0xa8]
mov eax, dword [ebp + 0xa4]
mov edx, dword [ebp + 0xa0]
mov edi, dword [ebp + 0xb0]
sub ecx, 2
add eax, 2
mov dword [esp + 0x50], ecx
mov ecx, dword [ebp + 0xac]
mov dword [esp + 0x4c], eax
add esp, 0x2c
add edx, 2
sub ecx, 2
add eax, 6
mov dword [esp + 0x1c], edx
test edi, edi
mov dword [esp + 0x28], ecx
mov dword [esp + 0x10], eax
je 0x491765
jmp 0x4912bb
mov ecx, dword [esp + 0x28]
mov edx, dword [esp + 0x1c]
mov eax, dword [esp + 0x10]
mov esi, dword [edi + 0x84]
test esi, esi
je 0x491765
cmp eax, ecx
jg 0x491781
cmp edi, dword [ebp + 0xb0]
je 0x4912fc
lea esi, [eax + 0x12]
cmp esi, ecx
jge 0x4912f8
lea ecx, [esp + 0x1c]
push ecx
mov ecx, dword [ebp + 0x40]
mov ecx, dword [ecx + 4]
push ecx
push 0x39
push eax
push edx
call fcn.0048f700
add esp, 0x14
mov dword [esp + 0x10], esi
mov edx, dword [edi]
mov ecx, edi
call dword [edx + 0x8c]
test eax, eax
mov dword [esp + 0x3c], eax
je 0x491318
mov bx, word [eax + 6]
mov dword [esp + 0x18], ebx
jmp 0x491324
mov dword [esp + 0x18], 0x2c
mov ebx, dword [esp + 0x18]
mov edx, dword [ebp + 0xb4]
mov esi, edi
mov eax, dword [edi + 0xa8]
sub esi, edx
neg esi
sbb esi, esi
and esi, 0x1fe
add esi, 0x21
test eax, eax
je 0x4914a6
push eax
call fcn.004ee563
add esp, 4
test eax, eax
je 0x4914a6
mov eax, dword [edi + 0xa8]
push eax
call fcn.004ee563
lea ecx, [esp + 0x4c]
push eax
push ecx
call fcn.004b3120
add esp, 0xc
mov ecx, eax
mov dword [esp + 0x1f8], 0
call fcn.004dea20
lea edx, [esp + 0xf0]
push eax
push edx
call fcn.004ef84d
add esp, 8
lea ecx, [esp + 0x48]
mov dword [esp + 0x1f8], 0xffffffff
call fcn.004de3d0
mov bl, byte [esp + 0x17]
test bl, bl
je 0x4913c2
lea eax, [esp + 0xf0]
push str._at
push eax
jmp 0x4913cf
lea ecx, [esp + 0xf0]
push 0x520000
push ecx
call fcn.004ef823
mov eax, dword [edi + 0xac]
add esp, 8
lea edx, [esp + 0x58]
push 0xa
push edx
push eax
call fcn.004ef7f1
lea ecx, [esp + 0x64]
lea edx, [esp + 0xfc]
push ecx
push edx
call fcn.004ef823
add esp, 0x14
test bl, bl
je 0x491418
lea eax, [esp + 0xf0]
push 0x51fff8
push eax
call fcn.004ef823
add esp, 8
lea ecx, [esp + 0x30]
lea edx, [esp + 0x2c]
push ecx
lea eax, [esp + 0x38]
push edx
push eax
lea ecx, [esp + 0xfc]
push 0x64
push ecx
call fcn.004dca60
mov edx, dword [esp + 0x2c]
mov eax, dword [esp + 0x40]
and edx, 0xffff
add esp, 0x14
cmp eax, edx
jle 0x49144f
mov dword [esp + 0x18], eax
and esi, 0xffff
lea eax, [esp + 0x1c]
push 0
push eax
lea ecx, [esi + esi*4]
xor eax, eax
lea edx, [esi + ecx*2]
mov ecx, dword [esp + 0x18]
add ecx, 2
mov ax, word [edx*8 + 0xcac138]
mov edx, dword [esp + 0x24]
push eax
add edx, 0x3c
push ecx
mov ecx, dword [ebp + 0x20]
push edx
mov edx, dword [ebp + 0x40]
lea eax, [esp + 0x104]
push eax
mov eax, dword [edx + 4]
push ecx
add eax, 4
push 0x64
push eax
call fcn.004dd2e0
mov ebx, dword [esp + 0x3c]
add esp, 0x24
jmp 0x491542
mov ecx, dword [edi + 0xac]
mov edx, dword [edi + 0xa8]
push ecx
push edx
lea eax, [esp + 0x78]
push str._s_at__d_gp
push eax
call fcn.004ee486
lea ecx, [esp + 0x40]
push 0
lea edx, [esp + 0x40]
push ecx
lea eax, [esp + 0x4c]
push edx
push eax
lea ecx, [esp + 0x90]
push 0x64
push ecx
push 9
call fcn.004a7f90
mov eax, dword [esp + 0x58]
mov edx, ebx
and edx, 0xffff
add esp, 0x2c
cmp eax, edx
jle 0x4914fe
mov dword [esp + 0x18], eax
mov ebx, eax
mov edx, dword [ebp + 0x40]
mov ecx, dword [ebp + 0x20]
push 0
push 0
lea eax, [esp + 0x24]
push 0
push eax
mov eax, dword [edx + 4]
mov edx, dword [esp + 0x20]
add eax, 4
push ecx
push eax
mov eax, dword [esp + 0x34]
lea ecx, [esp + 0x88]
and esi, 0xffff
push 0x64
push ecx
push esi
add edx, 2
push 9
add eax, 0x32
push edx
push eax
call fcn.004a7420
add esp, 0x30
mov ecx, dword [edi + 0x84]
mov al, byte [ecx + 0xa1]
cmp al, 0x1b
mov eax, dword [ebp + 0xd8]
jne 0x491593
test eax, eax
je 0x49156e
mov ecx, dword [edi + 0x80]
cmp dword [eax + 4], ecx
je 0x491589
mov eax, dword [eax + 0xc]
test eax, eax
jne 0x491562
xor eax, eax
and eax, 0xffff
mov edx, 1
sub edx, eax
lea eax, [esp + 0x70]
push edx
push 0x5192f0
push eax
jmp 0x4915c3
test eax, eax
je 0x49156e
mov ax, word [eax + 0xa]
jmp 0x491570
test eax, eax
je 0x4915a9
mov ecx, dword [edi + 0x80]
cmp dword [eax + 4], ecx
je 0x4915f6
mov eax, dword [eax + 0xc]
test eax, eax
jne 0x49159d
xor eax, eax
xor ecx, ecx
and eax, 0xffff
mov cx, word [edi + 0x42]
lea edx, [esp + 0x70]
sub ecx, eax
push ecx
push 0x5192f0
push edx
call fcn.004ee486
add esp, 0xc
lea eax, [esp + 0x30]
lea ecx, [esp + 0x2c]
lea edx, [esp + 0x34]
push eax
push ecx
lea eax, [esp + 0x78]
push edx
push eax
push 9
call fcn.004a7e80
add esp, 0x14
cmp bx, 0x2c
jae 0x491600
mov eax, 0x2c
jmp 0x491607
test eax, eax
je 0x4915a9
mov ax, word [eax + 0xa]
jmp 0x4915ab
mov eax, ebx
and eax, 0xffff
mov edx, dword [ebp + 0x20]
lea ecx, [esp + 0x1c]
push ecx
mov ecx, dword [ebp + 0x40]
push edx
mov edx, dword [ecx + 4]
lea ecx, [esp + 0x78]
add edx, 4
push edx
mov edx, dword [esp + 0x3c]
push ecx
mov ecx, dword [esp + 0x20]
add eax, edx
push esi
mov esi, dword [esp + 0x48]
push 9
lea edx, [eax + ecx - 0x1d]
mov eax, dword [esp + 0x3c]
sub eax, esi
push edx
push eax
call fcn.004a7380
mov esi, dword [esp + 0x5c]
add esp, 0x20
test esi, esi
je 0x491708
mov ecx, dword [ebp + 0x40]
xor edx, edx
mov eax, dword [ecx + 4]
mov dx, word [eax]
add eax, 4
push edx
push eax
call fcn.004d55c0
mov ax, word [edi + 0x46]
add esp, 8
test ax, ax
je 0x4916c8
cmp ax, 0xea60
jbe 0x491683
mov dword [0xd413c0], 1
jmp 0x49168e
and eax, 0xffff
dec eax
mov dword [0xd413c0], eax
cmp bx, 0x2c
jae 0x4916b1
mov ecx, ebx
mov eax, 0x2c
and ecx, 0xffff
sub eax, ecx
cdq
sub eax, edx
mov edx, dword [esp + 0x10]
sar eax, 1
add eax, edx
push eax
jmp 0x4916b6
mov ecx, dword [esp + 0x10]
push ecx
mov edx, dword [esp + 0x20]
lea eax, [esp + 0x20]
push edx
push eax
push esi
push 0x4d4f70
jmp 0x491700
cmp bx, 0x2c
jae 0x4916eb
mov ecx, ebx
mov eax, 0x2c
and ecx, 0xffff
sub eax, ecx
cdq
sub eax, edx
mov edx, dword [esp + 0x10]
sar eax, 1
add eax, edx
push eax
jmp 0x4916f0
mov ecx, dword [esp + 0x10]
push ecx
mov edx, dword [esp + 0x20]
lea eax, [esp + 0x20]
push edx
push eax
push esi
push fcn.004d4cf0
call fcn.004d55e0
add esp, 0x14
cmp bx, 0x2c
jae 0x491715
mov eax, 0x2c
jmp 0x49171d
and ebx, 0xffff
mov eax, ebx
mov ecx, dword [esp + 0x10]
mov edi, dword [edi + 0x48]
add ecx, eax
test edi, edi
mov dword [esp + 0x10], ecx
jne 0x4912af
mov eax, dword [esp + 0x38]
test eax, eax
jne 0x491759
mov ecx, dword [ebp + 0x38]
mov dword [esp + 0x38], 1
mov edx, dword [ecx + 0x138]
mov edi, dword [edx + 0xb0]
test edi, edi
jne 0x4912af
mov ecx, dword [esp + 0x28]
mov edx, dword [esp + 0x1c]
mov eax, dword [esp + 0x10]
cmp eax, ecx
jg 0x491781
lea ecx, [esp + 0x1c]
push ecx
mov ecx, dword [ebp + 0x40]
mov ecx, dword [ecx + 4]
push ecx
push 0x39
push eax
push edx
call fcn.0048f700
add esp, 0x14
mov ecx, dword [esp + 0x1f0]
pop edi
pop esi
pop ebp
pop ebx
mov dword fs:[0], ecx
add esp, 0x1ec
ret