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

Disassembly:
sub esp, 0x570
mov eax, dword [0x5513d4]
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 [0x523720]
mov ecx, ebx
call esi
push 0x64
mov byte [esp + 0x17], 1
call fcn.00418f10
mov edi, dword [esp + 0x5a4]
mov esi, edi
mov ebp, dword [esp + 0x5a8]
mov dword [0x58c348], 0xffffffff
mov dword [esp + 0x58], esi
mov dword [esp + 0x40], ebp
test ebp, ebp
jl 0x49169e
jg 0x4910b2
test edi, edi
je 0x49169e
mov edx, dword [esp + 0x60]
mov dword [esp + 0x50], edx
mov edx, dword [esp + 0x5c]
mov dword [esp + 0x4c], edx
call fcn.0049dc00
mov eax, dword [esp + 0x40]
cmp esi, 0x7fffffff
jne 0x4910e3
cmp eax, esi
jne 0x4910e3
mov dword [0x58c348], 0xffffffff
jmp 0x491120
push eax
push esi
sub esi, edi
sbb eax, ebp
push eax
push esi
call fcn.0049c470
mov ecx, dword [ebx + 0x2214]
mov esi, eax
cmp byte [ecx + 0x6148], 0
jne 0x49111a
cmp esi, dword [0x58c348]
je 0x49111a
push 0
push 0x64
cdq
push edx
push eax
push 0x532df4
call fcn.0049fe40
mov dword [0x58c348], esi
mov dword [esp + 0x44], edi
mov dword [esp + 0x48], ebp
test ebp, ebp
jg 0x49115c
jl 0x491136
cmp edi, 0x200
jae 0x49115c
mov eax, 0x200
mov esi, edi
sub eax, edi
push eax
lea eax, [esp + 0x280]
add eax, edi
push 0
push eax
call fcn.00505530
add esp, 0xc
xor edi, edi
mov dword [esp + 0x2c], edi
jmp 0x49116e
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 [0x523720]
mov ecx, ebx
call esi
mov dword [esp + 0x54], eax
lea eax, [esp + 0x27c]
push 0x200
push eax
push 0xffffffffffffffff
call fcn.00468fb0
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 [0x523720]
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 [0x523720]
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 [0x523720]
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.00503210
or eax, edx
je 0x491239
lea edi, [ebp + 1]
mov dword [esp + 0x60], ebp
jmp 0x49123f
xor edi, edi
mov dword [esp + 0x60], edi
push 0
push 0x200
push esi
push dword [esp + 0x34]
call fcn.00503120
xor edx, edx
lea esi, [edi + eax]
test esi, esi
jle 0x491293
mov eax, dword [esp + 0x34]
mov ecx, eax
test ecx, ecx
jns 0x491266
add ecx, 1
sar ecx, 1
lea edi, [ecx - 2]
jmp 0x491270
cmp edx, edi
jge 0x491293
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 0x491270
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 [0x523720]
mov ecx, ebx
call esi
mov eax, dword [esp + 0x1c]
cmp dword [esp + 0x18], eax
jne 0x4912cc
mov byte [esp + 0x13], 1
jmp 0x491680
mov eax, dword [ebx]
xor edi, edi
mov dword [esp + 0x5c], edi
mov esi, dword [eax + 0x14]
mov ecx, esi
call dword [0x523720]
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 0x491603
mov eax, dword [esp + 0x44]
jl 0x491333
cmp ecx, eax
jae 0x491603
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 [0x523720]
mov ecx, ebx
call esi
cmp dword [esp + 0x30], 0
jg 0x49139b
jl 0x49137b
cmp edi, 0x200
jae 0x49139b
mov eax, 0x200
mov esi, edi
sub eax, edi
push eax
lea eax, [esp + 0x280]
add eax, edi
push 0
push eax
call fcn.00505530
add esp, 0xc
jmp 0x4913a0
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 [0x523720]
mov ecx, ebx
call esi
mov cl, byte [esp + 0x27c]
mov eax, 1
cmp byte [esp + eax + 0x27c], cl
jne 0x4913e9
inc eax
cmp eax, 0x200
jb 0x4913c6
mov eax, dword [esp + 0x20]
mov edi, dword [esp + 0x1c]
add eax, 0x1ff
jmp 0x4915c8
push 0x200
lea eax, [esp + 0x280]
push eax
push 0xffffffffffffffff
call fcn.00468fb0
movzx eax, ax
xor edi, edi
mov dword [esp + 0x18], eax
test ebp, ebp
je 0x4915bc
mov edi, edi
cmp dword [esp + edi*4 + 0x7c], eax
jne 0x4915b3
lea eax, [ebp - 1]
cmp edi, eax
jae 0x4915aa
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 [0x523720]
mov ecx, ebx
call esi
mov esi, dword [esp + 0x34]
mov eax, dword [esp + 0x30]
sub esi, 0x200
sbb eax, 0
js 0x4915af
jg 0x491474
test esi, esi
jb 0x4915af
test eax, eax
jg 0x4914a0
jl 0x491482
cmp esi, 0x200
jae 0x4914a0
mov eax, 0x200
sub eax, esi
push eax
lea eax, [esp + 0x280]
add eax, esi
push 0
push eax
call fcn.00505530
add esp, 0xc
jmp 0x4914a5
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 [0x523720]
mov ecx, ebx
call esi
push 0x200
lea eax, [esp + 0x280]
push eax
push 0xffffffffffffffff
call fcn.00468fb0
movzx eax, ax
cmp dword [esp + edi*4 + 0x80], eax
jne 0x4915af
lea eax, [ebp - 2]
cmp edi, eax
jae 0x49156a
mov esi, dword [esp + 0x34]
mov eax, dword [esp + 0x30]
sub esi, 0x400
sbb eax, 0
test eax, eax
jg 0x49152b
jl 0x49150d
cmp esi, 0x200
jae 0x49152b
mov eax, 0x200
sub eax, esi
push eax
lea eax, [esp + 0x280]
add eax, esi
push 0
push eax
call fcn.00505530
add esp, 0xc
jmp 0x491530
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 [0x523720]
mov ecx, ebx
call esi
push 0x200
lea eax, [esp + 0x280]
push eax
push 0xffffffffffffffff
call fcn.00468fb0
movzx eax, ax
cmp dword [esp + edi*4 + 0x84], eax
jne 0x4915af
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 0x4915de
jl 0x4915e6
mov eax, dword [esp + 0x14]
cmp ecx, eax
jae 0x4915e2
jmp 0x4915e6
cmp ebp, 4
jb 0x49156a
mov eax, dword [esp + 0x18]
inc edi
cmp edi, ebp
jb 0x491410
mov edi, dword [esp + 0x1c]
test edi, edi
jne 0x4915ff
mov eax, dword [esp + 0x20]
mov esi, dword [esp + 0x14]
inc eax
mov dword [esp + 0x20], eax
cmp eax, 0x10000
jl 0x491310
jmp 0x491603
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 0x4915c0
jl 0x4915f7
test eax, eax
jae 0x4915c0
xor edi, edi
mov dword [esp + 0x1c], edi
jmp 0x4915c4
mov esi, dword [esp + 0x14]
test edi, edi
setne byte [esp + 0x13]
test edi, edi
je 0x49165b
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.0040a910
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.004ac1b0
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 [0x523720]
mov ecx, ebx
call esi
mov ebp, dword [esp + 0x2c]
mov edi, dword [esp + 0x28]
mov esi, dword [esp + 0x58]
test ebp, ebp
jg 0x4910c2
jl 0x49169e
test edi, edi
jne 0x4910c2
push 0
push 0x64
push 0
push 0x64
call fcn.0049c470
mov ecx, dword [ebx + 0x2214]
mov esi, eax
cmp byte [ecx + 0x6148], 0
jne 0x4916d5
cmp esi, dword [0x58c348]
je 0x4916d5
push 0
push 0x64
cdq
push edx
push eax
push 0x532df4
call fcn.0049fe40
mov ecx, dword [esp + 0x57c]
pop edi
mov dword [0x58c348], esi
pop esi
pop ebp
pop ebx
xor ecx, esp
call fcn.00502f8e
add esp, 0x570
ret 0x28