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

Disassembly:
sub esp, 0x570
mov eax, dword [0x5755c4]
xor eax, esp
mov dword [esp + 0x56c], eax
mov eax, dword [esp + 0x578]
push ebx
mov ebx, dword [esp + 0x578]
mov dword [esp + 0x68], eax
mov eax, dword [esp + 0x580]
push ebp
mov dword [esp + 0x70], eax
mov eax, dword [esp + 0x588]
push esi
mov dword [esp + 0x34], eax
mov eax, dword [esp + 0x590]
push edi
mov dword [esp + 0x3c], eax
mov eax, dword [ebx]
push 0
push 0
push 0
mov esi, dword [eax + 0x10]
mov ecx, esi
call dword [0x540780]
mov ecx, ebx
call esi
push 0x67
mov byte [esp + 0x17], 1
call fcn.004193f0
mov edi, dword [esp + 0x5a4]
mov esi, edi
mov ebp, dword [esp + 0x5a8]
mov dword [0x5b7828], 0xffffffff
mov dword [esp + 0x58], esi
mov dword [esp + 0x40], ebp
test ebp, ebp
jl 0x4925ee
jg 0x492002
test edi, edi
je 0x4925ee
mov edx, dword [esp + 0x60]
mov dword [esp + 0x50], edx
mov edx, dword [esp + 0x5c]
mov dword [esp + 0x4c], edx
call fcn.0049e910
mov eax, dword [esp + 0x40]
cmp esi, 0x7fffffff
jne 0x492033
cmp eax, esi
jne 0x492033
mov dword [0x5b7828], 0xffffffff
jmp 0x492070
push eax
push esi
sub esi, edi
sbb eax, ebp
push eax
push esi
call fcn.0049d200
mov ecx, dword [ebx + 0x2214]
mov esi, eax
cmp byte [ecx + 0x6148], 0
jne 0x49206a
cmp esi, dword [0x5b7828]
je 0x49206a
push 0
push 0x64
cdq
push edx
push eax
push 0x5508b4
call fcn.004a0b80
mov dword [0x5b7828], esi
mov dword [esp + 0x44], edi
mov dword [esp + 0x48], ebp
test ebp, ebp
jg 0x4920ac
jl 0x492086
cmp edi, 0x200
jae 0x4920ac
mov eax, 0x200
mov esi, edi
sub eax, edi
push eax
lea eax, [esp + 0x280]
add eax, edi
push 0
push eax
call fcn.00520500
add esp, 0xc
xor edi, edi
mov dword [esp + 0x2c], edi
jmp 0x4920be
add edi, 0xfffffe00
mov esi, 0x200
adc ebp, 0xffffffff
mov dword [esp + 0x2c], ebp
mov eax, dword [ebx]
lea ecx, [esp + 0x27c]
push esi
push ecx
mov dword [esp + 0x30], edi
mov esi, dword [eax + 0xc]
mov ecx, esi
call dword [0x540780]
mov ecx, ebx
call esi
mov dword [esp + 0x54], eax
lea eax, [esp + 0x27c]
push 0x200
push eax
push 0xffffffffffffffff
call fcn.00469970
movzx eax, ax
xor ebp, ebp
mov dword [esp + 0x1c], eax
mov eax, dword [ebx]
mov esi, dword [eax + 0x14]
mov ecx, esi
call dword [0x540780]
mov ecx, ebx
call esi
mov esi, dword [ebx]
push ebp
push dword [esp + 0x40]
mov dword [esp + 0x28], eax
push dword [esp + 0x40]
mov esi, dword [esi + 0x10]
mov ecx, esi
mov dword [esp + 0x3c], edx
call dword [0x540780]
mov ecx, ebx
call esi
mov eax, dword [ebx]
lea ecx, [esp + 0x47c]
push 0x100
push ecx
mov esi, dword [eax + 0xc]
mov ecx, esi
call dword [0x540780]
mov ecx, ebx
call esi
movzx ecx, byte [esp + 0x47c]
mov esi, dword [esp + 0x2c]
mov dword [esp + 0x34], eax
movzx eax, byte [esp + 0x47d]
push ebp
push 0x200
shl eax, 8
push esi
add eax, ecx
push edi
mov dword [esp + 0x28], eax
call fcn.005079a0
or eax, edx
je 0x492189
lea edi, [ebp + 1]
mov dword [esp + 0x60], ebp
jmp 0x49218f
xor edi, edi
mov dword [esp + 0x60], edi
push 0
push 0x200
push esi
push dword [esp + 0x34]
call fcn.005078b0
xor edx, edx
lea esi, [edi + eax]
test esi, esi
jle 0x4921e3
mov eax, dword [esp + 0x34]
mov ecx, eax
test ecx, ecx
jns 0x4921b6
add ecx, 1
sar ecx, 1
lea edi, [ecx - 2]
jmp 0x4921c0
cmp edx, edi
jge 0x4921e3
movzx ecx, byte [esp + edx*2 + 0x47f]
movzx eax, byte [esp + edx*2 + 0x47e]
inc edx
shl ecx, 8
add ecx, eax
mov dword [esp + ebp*4 + 0x7c], ecx
inc ebp
cmp edx, esi
jl 0x4921c0
mov esi, dword [ebx]
add dword [esp + 0x38], 2
push 0
push dword [esp + 0x34]
mov esi, dword [esi + 0x10]
mov ecx, esi
push dword [esp + 0x28]
adc dword [esp + 0x48], 0
call dword [0x540780]
mov ecx, ebx
call esi
mov eax, dword [esp + 0x1c]
cmp dword [esp + 0x18], eax
jne 0x49221c
mov byte [esp + 0x13], 1
jmp 0x4925d0
mov eax, dword [ebx]
xor edi, edi
mov dword [esp + 0x5c], edi
mov esi, dword [eax + 0x14]
mov ecx, esi
call dword [0x540780]
mov ecx, ebx
call esi
mov esi, eax
mov dword [esp + 0x1c], edi
sub esi, dword [esp + 0x54]
mov eax, edx
mov dword [esp + 0x14], esi
sbb eax, edi
mov dword [esp + 0x24], eax
movzx eax, byte [esp + 0x13]
neg eax
sbb eax, eax
and eax, 0xffff0202
add eax, 0xfdff
mov dword [esp + 0x20], eax
cdq
mov ecx, eax
mov dword [esp + 0x68], edx
mov dword [esp + 0x64], ecx
cmp edx, dword [esp + 0x48]
jg 0x492553
mov eax, dword [esp + 0x44]
jl 0x492283
cmp ecx, eax
jae 0x492553
mov edi, eax
mov eax, dword [esp + 0x48]
sub edi, ecx
push 0
sbb eax, edx
mov dword [esp + 0x38], edi
add ecx, esi
mov dword [esp + 0x34], eax
mov esi, dword [ebx]
mov eax, edx
adc eax, dword [esp + 0x28]
push eax
mov dword [esp + 0x74], ecx
mov esi, dword [esi + 0x10]
push ecx
mov ecx, esi
mov dword [esp + 0x7c], eax
call dword [0x540780]
mov ecx, ebx
call esi
cmp dword [esp + 0x30], 0
jg 0x4922eb
jl 0x4922cb
cmp edi, 0x200
jae 0x4922eb
mov eax, 0x200
mov esi, edi
sub eax, edi
push eax
lea eax, [esp + 0x280]
add eax, edi
push 0
push eax
call fcn.00520500
add esp, 0xc
jmp 0x4922f0
mov esi, 0x200
mov eax, dword [ebx]
lea ecx, [esp + 0x27c]
push esi
push ecx
mov esi, dword [eax + 0xc]
mov ecx, esi
call dword [0x540780]
mov ecx, ebx
call esi
mov cl, byte [esp + 0x27c]
mov eax, 1
cmp byte [esp + eax + 0x27c], cl
jne 0x492339
inc eax
cmp eax, 0x200
jb 0x492316
mov eax, dword [esp + 0x20]
mov edi, dword [esp + 0x1c]
add eax, 0x1ff
jmp 0x492518
push 0x200
lea eax, [esp + 0x280]
push eax
push 0xffffffffffffffff
call fcn.00469970
movzx eax, ax
xor edi, edi
mov dword [esp + 0x18], eax
test ebp, ebp
je 0x49250c
mov edi, edi
cmp dword [esp + edi*4 + 0x7c], eax
jne 0x492503
lea eax, [ebp - 1]
cmp edi, eax
jae 0x4924fa
mov ecx, dword [esp + 0x64]
add ecx, dword [esp + 0x14]
mov eax, dword [esp + 0x68]
adc eax, dword [esp + 0x24]
add ecx, 0x200
mov esi, dword [ebx]
push 0
adc eax, 0
push eax
mov esi, dword [esi + 0x10]
push ecx
mov ecx, esi
call dword [0x540780]
mov ecx, ebx
call esi
mov esi, dword [esp + 0x34]
mov eax, dword [esp + 0x30]
sub esi, 0x200
sbb eax, 0
js 0x4924ff
jg 0x4923c4
test esi, esi
jb 0x4924ff
test eax, eax
jg 0x4923f0
jl 0x4923d2
cmp esi, 0x200
jae 0x4923f0
mov eax, 0x200
sub eax, esi
push eax
lea eax, [esp + 0x280]
add eax, esi
push 0
push eax
call fcn.00520500
add esp, 0xc
jmp 0x4923f5
mov esi, 0x200
mov eax, dword [ebx]
lea ecx, [esp + 0x27c]
push esi
push ecx
mov esi, dword [eax + 0xc]
mov ecx, esi
call dword [0x540780]
mov ecx, ebx
call esi
push 0x200
lea eax, [esp + 0x280]
push eax
push 0xffffffffffffffff
call fcn.00469970
movzx eax, ax
cmp dword [esp + edi*4 + 0x80], eax
jne 0x4924ff
lea eax, [ebp - 2]
cmp edi, eax
jae 0x4924ba
mov esi, dword [esp + 0x34]
mov eax, dword [esp + 0x30]
sub esi, 0x400
sbb eax, 0
test eax, eax
jg 0x49247b
jl 0x49245d
cmp esi, 0x200
jae 0x49247b
mov eax, 0x200
sub eax, esi
push eax
lea eax, [esp + 0x280]
add eax, esi
push 0
push eax
call fcn.00520500
add esp, 0xc
jmp 0x492480
mov esi, 0x200
mov eax, dword [ebx]
lea ecx, [esp + 0x27c]
push esi
push ecx
mov esi, dword [eax + 0xc]
mov ecx, esi
call dword [0x540780]
mov ecx, ebx
call esi
push 0x200
lea eax, [esp + 0x280]
push eax
push 0xffffffffffffffff
call fcn.00469970
movzx eax, ax
cmp dword [esp + edi*4 + 0x84], eax
jne 0x4924ff
mov ecx, dword [esp + 0x6c]
lea eax, [edi + 1]
mov edi, dword [esp + 0x20]
mov esi, dword [esp + 0x70]
mov edx, dword [esp + 0x24]
shl eax, 9
sub edi, eax
sub ecx, 1
mov dword [esp + 0x1c], edi
sbb esi, 0
and ecx, 0xfffffe00
mov dword [esp + 0x50], esi
mov dword [esp + 0x4c], ecx
cmp esi, edx
jg 0x49252e
jl 0x492536
mov eax, dword [esp + 0x14]
cmp ecx, eax
jae 0x492532
jmp 0x492536
cmp ebp, 4
jb 0x4924ba
mov eax, dword [esp + 0x18]
inc edi
cmp edi, ebp
jb 0x492360
mov edi, dword [esp + 0x1c]
test edi, edi
jne 0x49254f
mov eax, dword [esp + 0x20]
mov esi, dword [esp + 0x14]
inc eax
mov dword [esp + 0x20], eax
cmp eax, 0x10000
jl 0x492260
jmp 0x492553
mov eax, dword [esp + 0x14]
mov ecx, eax
mov esi, edx
mov eax, edi
cdq
add eax, ecx
adc edx, esi
test edx, edx
jg 0x492510
jl 0x492547
test eax, eax
jae 0x492510
xor edi, edi
mov dword [esp + 0x1c], edi
jmp 0x492514
mov esi, dword [esp + 0x14]
test edi, edi
setne byte [esp + 0x13]
test edi, edi
je 0x4925ab
mov eax, edi
cdq
add esi, eax
mov dword [esp + 0x14], esi
adc dword [esp + 0x24], edx
sub dword [esp + 0x28], eax
mov esi, dword [esp + 0x74]
mov ecx, esi
sbb dword [esp + 0x2c], edx
push 1
call fcn.004236f0
mov ecx, dword [esi]
mov eax, dword [esi + 4]
mov edx, dword [esp + 0x4c]
mov esi, dword [esp + 0x78]
push 1
mov dword [ecx + eax*8 - 8], edx
mov edx, dword [esp + 0x54]
mov dword [ecx + eax*8 - 4], edx
mov ecx, esi
call fcn.0041e780
mov ecx, dword [esi + 4]
mov eax, dword [esi]
mov dword [eax + ecx*4 - 4], edi
mov ecx, dword [esp + 0x54]
add ecx, dword [esp + 0x14]
mov esi, dword [ebx]
mov eax, dword [esp + 0x5c]
adc eax, dword [esp + 0x24]
push 0
mov esi, dword [esi + 0x10]
push eax
push ecx
mov ecx, esi
call dword [0x540780]
mov ecx, ebx
call esi
mov ebp, dword [esp + 0x2c]
mov edi, dword [esp + 0x28]
mov esi, dword [esp + 0x58]
test ebp, ebp
jg 0x492012
jl 0x4925ee
test edi, edi
jne 0x492012
push 0
push 0x64
push 0
push 0x64
call fcn.0049d200
mov ecx, dword [ebx + 0x2214]
mov esi, eax
cmp byte [ecx + 0x6148], 0
jne 0x492625
cmp esi, dword [0x5b7828]
je 0x492625
push 0
push 0x64
cdq
push edx
push eax
push 0x5508b4
call fcn.004a0b80
mov ecx, dword [esp + 0x57c]
pop edi
mov dword [0x5b7828], esi
pop esi
pop ebp
pop ebx
xor ecx, esp
call fcn.00507712
add esp, 0x570
ret 0x28