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

Disassembly:
sub esp, 0x6c
mov eax, dword [0x51093c]
xor eax, esp
mov dword [esp + 0x68], eax
mov eax, dword [esp + 0x74]
push ebx
push ebp
push esi
push edi
mov edi, dword [esp + 0x80]
mov ebp, ecx
mov dword [esp + 0x10], eax
xor esi, esi
cmp edi, dword [eax]
jb 0x4916d6
mov ecx, edi
sub ecx, dword [eax + 4]
cmp ecx, dword [eax + 0x10]
je 0x491c3a
push dword [eax + 0x48]
push ecx
lea ecx, [esp + 0x20]
push ecx
mov ecx, eax
call fcn.0041f860
cmp byte [esp + 0x1c], 0
mov edi, dword [esp + 0x18]
jne 0x491c56
movzx ebx, byte [edi]
cmp ebx, 0x80
jae 0x4916e4
inc edi
jmp 0x491716
movzx ecx, byte [edi + 1]
add ebx, 0xffffff80
mov eax, ecx
shl eax, 7
add ebx, eax
cmp ecx, 0x80
jae 0x4916ff
add edi, 2
jmp 0x491716
push ebx
lea eax, [esp + 0x24]
push edi
push eax
call fcn.004202d0
mov ebx, dword [esp + 0x30]
add esp, 0xc
mov edi, dword [esp + 0x20]
mov eax, ebx
shr eax, 3
cmp eax, 0x3e7
ja case.0x49173d.2
je 0x491b4e
dec eax
cmp eax, 0x2c
ja case.0x49173d.2
movzx eax, byte [eax + 0x491cc4]
jmp dword [eax*4 + 0x491c70]
cmp bl, 0xa
jne case.0x49173d.2
or dword [ebp + 0x14], 1
mov eax, dword [ebp + 4]
and eax, 0xfffffffc
test byte [ebp + 4], 1
je 0x49175f
mov eax, dword [eax]
lea ecx, [ebp + 0x2c]
push eax
call fcn.0041cdc0
mov ecx, dword [esp + 0x10]
push ecx
push edi
push eax
call fcn.0041faf0
add esp, 0xc
mov edi, eax
test edi, edi
je 0x491c44
mov eax, dword [esp + 0x10]
jmp 0x4916a5
cmp bl, 0x42
jne case.0x49173d.2
or dword [ebp + 0x14], 2
mov eax, dword [ebp + 4]
and eax, 0xfffffffc
test byte [ebp + 4], 1
je 0x4917a5
mov eax, dword [eax]
lea ecx, [ebp + 0x30]
jmp 0x491762
cmp bl, 0x48
jne case.0x49173d.2
lea eax, [esp + 0x28]
push eax
push edi
call fcn.0040d4c0
mov edi, eax
add esp, 8
test edi, edi
je 0x491c44
mov ebx, dword [esp + 0x28]
lea eax, [ebx - 1]
cmp eax, 2
ja 0x4917ea
or dword [ebp + 0x14], 0x40000
mov eax, dword [esp + 0x10]
mov dword [ebp + 0x5c], ebx
jmp 0x4916a5
mov ecx, ebp
call fcn.00495840
push dword [esp + 0x2c]
mov ecx, eax
push ebx
push 9
call fcn.00421030
mov eax, dword [esp + 0x10]
jmp 0x4916a5
cmp bl, 0x50
jne case.0x49173d.2
lea eax, [esp + 0x30]
or esi, 0x400
push eax
push edi
call fcn.0040d4c0
mov edi, eax
add esp, 8
mov eax, dword [esp + 0x30]
or eax, dword [esp + 0x34]
je 0x49183b
mov al, 1
mov byte [ebp + 0x54], al
jmp 0x491779
xor al, al
mov byte [ebp + 0x54], al
jmp 0x491779
cmp bl, 0x5a
jne case.0x49173d.2
or dword [ebp + 0x14], 4
mov eax, dword [ebp + 4]
and eax, 0xfffffffc
test byte [ebp + 4], 1
je 0x491860
mov eax, dword [eax]
lea ecx, [ebp + 0x34]
jmp 0x491762
cmp bl, 0x80
jne case.0x49173d.2
lea eax, [esp + 0x38]
or esi, 0x2000
push eax
push edi
call fcn.0040d4c0
mov edi, eax
add esp, 8
mov eax, dword [esp + 0x38]
or eax, dword [esp + 0x3c]
je 0x49189b
mov al, 1
mov byte [ebp + 0x57], al
jmp 0x491779
xor al, al
mov byte [ebp + 0x57], al
jmp 0x491779
cmp bl, 0x88
jne case.0x49173d.2
lea eax, [esp + 0x40]
or esi, 0x4000
push eax
push edi
call fcn.0040d4c0
mov edi, eax
add esp, 8
mov eax, dword [esp + 0x40]
or eax, dword [esp + 0x44]
je 0x4918d8
mov al, 1
mov byte [ebp + 0x58], al
jmp 0x491779
xor al, al
mov byte [ebp + 0x58], al
jmp 0x491779
cmp bl, 0x90
jne case.0x49173d.2
lea eax, [esp + 0x48]
or esi, 0x8000
push eax
push edi
call fcn.0040d4c0
mov edi, eax
add esp, 8
mov eax, dword [esp + 0x48]
or eax, dword [esp + 0x4c]
je 0x491915
mov al, 1
mov byte [ebp + 0x59], al
jmp 0x491779
xor al, al
mov byte [ebp + 0x59], al
jmp 0x491779
cmp bl, 0xa0
jne case.0x49173d.2
lea eax, [esp + 0x50]
or esi, 0x800
push eax
push edi
call fcn.0040d4c0
mov edi, eax
add esp, 8
mov eax, dword [esp + 0x50]
or eax, dword [esp + 0x54]
je 0x491952
mov al, 1
mov byte [ebp + 0x55], al
jmp 0x491779
xor al, al
mov byte [ebp + 0x55], al
jmp 0x491779
cmp bl, 0xb8
jne case.0x49173d.2
lea eax, [esp + 0x58]
or esi, 0x20000
push eax
push edi
call fcn.0040d4c0
mov edi, eax
add esp, 8
mov eax, dword [esp + 0x58]
or eax, dword [esp + 0x5c]
je 0x49198f
mov al, 1
mov byte [ebp + 0x5b], al
jmp 0x491779
xor al, al
mov byte [ebp + 0x5b], al
jmp 0x491779
cmp bl, 0xd8
jne case.0x49173d.2
lea eax, [esp + 0x60]
or esi, 0x1000
push eax
push edi
call fcn.0040d4c0
mov edi, eax
add esp, 8
mov eax, dword [esp + 0x60]
or eax, dword [esp + 0x64]
je 0x4919cc
mov al, 1
mov byte [ebp + 0x56], al
jmp 0x491779
xor al, al
mov byte [ebp + 0x56], al
jmp 0x491779
cmp bl, 0xf8
jne case.0x49173d.2
lea eax, [esp + 0x68]
or esi, 0x80000
push eax
push edi
call fcn.0040d4c0
mov edi, eax
add esp, 8
mov eax, dword [esp + 0x68]
or eax, dword [esp + 0x6c]
je 0x491a09
mov al, 1
mov byte [ebp + 0x60], al
jmp 0x491779
xor al, al
mov byte [ebp + 0x60], al
jmp 0x491779
cmp bl, 0x22
jne case.0x49173d.2
or dword [ebp + 0x14], 8
mov eax, dword [ebp + 4]
and eax, 0xfffffffc
test byte [ebp + 4], 1
je 0x491a2e
mov eax, dword [eax]
lea ecx, [ebp + 0x38]
jmp 0x491762
cmp bl, 0x2a
jne case.0x49173d.2
or dword [ebp + 0x14], 0x10
mov eax, dword [ebp + 4]
and eax, 0xfffffffc
test byte [ebp + 4], 1
je 0x491a51
mov eax, dword [eax]
lea ecx, [ebp + 0x3c]
jmp 0x491762
cmp bl, 0x3a
jne case.0x49173d.2
or dword [ebp + 0x14], 0x20
mov eax, dword [ebp + 4]
and eax, 0xfffffffc
test byte [ebp + 4], 1
je 0x491a74
mov eax, dword [eax]
lea ecx, [ebp + 0x40]
jmp 0x491762
cmp bl, 0x42
jne case.0x49173d.2
or dword [ebp + 0x14], 0x40
mov eax, dword [ebp + 4]
and eax, 0xfffffffc
test byte [ebp + 4], 1
je 0x491a97
mov eax, dword [eax]
lea ecx, [ebp + 0x44]
jmp 0x491762
cmp bl, 0x4a
jne case.0x49173d.2
or dword [ebp + 0x14], 0x80
mov eax, dword [ebp + 4]
and eax, 0xfffffffc
test byte [ebp + 4], 1
je 0x491abd
mov eax, dword [eax]
lea ecx, [ebp + 0x48]
jmp 0x491762
cmp bl, 0x50
jne case.0x49173d.2
lea eax, [esp + 0x70]
or esi, 0x10000
push eax
push edi
call fcn.0040d4c0
mov edi, eax
add esp, 8
mov eax, dword [esp + 0x70]
or eax, dword [esp + 0x74]
je 0x491af8
mov al, 1
mov byte [ebp + 0x5a], al
jmp 0x491779
xor al, al
mov byte [ebp + 0x5a], al
jmp 0x491779
cmp bl, 0x62
jne case.0x49173d.2
or dword [ebp + 0x14], 0x100
mov eax, dword [ebp + 4]
and eax, 0xfffffffc
test byte [ebp + 4], 1
je 0x491b20
mov eax, dword [eax]
lea ecx, [ebp + 0x4c]
jmp 0x491762
cmp bl, 0x6a
jne case.0x49173d.2
or dword [ebp + 0x14], 0x200
mov eax, dword [ebp + 4]
and eax, 0xfffffffc
test byte [ebp + 4], 1
je 0x491b46
mov eax, dword [eax]
lea ecx, [ebp + 0x50]
jmp 0x491762
cmp bl, 0x3a
jne case.0x49173d.2
add edi, 0xfffffffe
mov eax, dword [ebp + 0x28]
add edi, 2
test eax, eax
je 0x491b73
mov ecx, dword [ebp + 0x20]
cmp ecx, dword [eax]
jge 0x491b73
mov edx, dword [eax + ecx*4 + 4]
lea eax, [ecx + 1]
mov dword [ebp + 0x20], eax
jmp 0x491b89
push dword [ebp + 0x1c]
call fcn.00487db0
add esp, 4
lea ecx, [ebp + 0x1c]
push eax
call fcn.00436070
mov edx, eax
mov ecx, dword [esp + 0x10]
push edi
push edx
call fcn.004200b0
mov edi, eax
test edi, edi
je 0x491c44
mov eax, dword [esp + 0x10]
cmp edi, dword [eax]
jae 0x4916a9
mov ax, word [edi]
lea ecx, [esp + 0x14]
mov word [esp + 0x14], 0x3eba
cmp ax, word [ecx]
je 0x491b56
mov eax, dword [esp + 0x10]
jmp 0x4916a5
test ebx, ebx
je 0x491c48
mov eax, ebx
and al, 7
cmp al, 4
je 0x491c48
lea eax, [ebp + 4]
cmp ebx, 0x1f40
jb 0x491c03
mov ecx, dword [esp + 0x10]
push ecx
push eax
push 0x510640
push edi
push 0
push ebx
lea ecx, [ebp + 8]
call fcn.00478360
mov edi, eax
test edi, edi
je 0x491c44
mov eax, dword [esp + 0x10]
jmp 0x4916a5
test byte [eax], 1
je 0x491c12
mov eax, dword [eax]
and eax, 0xfffffffc
add eax, 4
jmp 0x491c19
mov ecx, eax
call fcn.0040d550
mov ecx, dword [esp + 0x10]
push ecx
push edi
push eax
push 0
push ebx
call fcn.004219a0
mov edi, eax
add esp, 0x14
test edi, edi
je 0x491c44
mov eax, dword [esp + 0x10]
jmp 0x4916a5
test ecx, ecx
jle 0x491c56
cmp dword [eax + 8], 0
jne 0x491c56
xor edi, edi
jmp 0x491c56
test edi, edi
je 0x491c44
mov ecx, dword [esp + 0x10]
lea eax, [ebx - 1]
mov dword [ecx + 0x3c], eax
or dword [ebp + 0x14], esi
mov eax, edi
mov ecx, dword [esp + 0x78]
pop edi
pop esi
pop ebp
pop ebx
xor ecx, esp
call fcn.004a2135
add esp, 0x6c
ret 8