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

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x84
push ebx
push esi
xor esi, esi
cmp word [ebp + 0x18], si
push edi
mov dword [esp + 0x10], esi
mov dword [esp + 0x18], esi
mov dword [esp + 0x1c], esi
je 0x499459
mov eax, dword [ebp + 8]
mov ecx, dword [eax]
mov edx, dword [ecx]
test byte [edx + 0x50], 0x40
je 0x499459
xor al, al
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov eax, dword [ebp + 0xc]
movzx eax, word [eax]
cmp ax, 0x3f
mov dword [esp + 0x68], eax
ja 0x499450
movzx ecx, ax
mov eax, 1
xor edx, edx
mov byte [esp + 0xd], 1
mov dword [esp + 0x2c], ecx
call sub.ntdll.dll__allshl
add eax, 0xffffffff
adc edx, 0xffffffff
test dword [ebp + 0x14], 0x803
mov dword [esp + 0x58], eax
mov dword [esp + 0x5c], edx
mov dword [esp + 0x50], esi
mov dword [esp + 0x54], esi
mov dword [esp + 0x40], esi
mov dword [esp + 0x44], esi
mov dword [esp + 0x3c], 0x182
je 0x4994b8
mov dword [esp + 0x3c], 0x183
mov dword [esp + 0x30], esi
lea esp, [esp]
mov ecx, dword [esp + 0x1c]
cmp ecx, dword [esp + 0x5c]
ja 0x499b78
jb 0x4994de
mov edx, dword [esp + 0x18]
cmp edx, dword [esp + 0x58]
jae 0x499b78
movzx ecx, word [ebp + 0x18]
mov edx, dword [esp + 0x30]
cmp edx, ecx
jg 0x499b78
test edx, edx
jle 0x499504
mov eax, dword [esp + 0x10]
mov esi, dword [eax + 8]
mov eax, dword [eax + 0xc]
or dword [esp + 0x40], esi
or dword [esp + 0x44], eax
cmp edx, ecx
jge 0x499526
test dword [ebp + 0x14], 0x800
mov ecx, dword [ebp + 0x10]
mov eax, dword [ecx + 0x18]
mov ecx, dword [eax + edx*4]
mov dword [esp + 0x10], ecx
jne 0x499b51
mov edx, ecx
jmp 0x49952d
mov edx, dword [ebp + 0x1c]
mov dword [esp + 0x10], edx
test dword [edx + 0x2c], 0x400
jne 0x499b63
mov eax, dword [ebp + 0x14]
and eax, 0x80
mov dword [esp + 0x70], eax
je 0x499550
xor ebx, ebx
mov word [edx + 0x1e], bx
jmp 0x499552
xor ebx, ebx
movzx eax, byte [edx + 0x10]
mov ecx, dword [ebp + 8]
mov ecx, dword [ecx + 4]
lea eax, [eax + eax*8]
mov eax, dword [ecx + eax*8 + 0x34]
xor ecx, ecx
cmp dword [esp + 0x2c], ebx
mov dword [esp + 0x34], eax
mov dword [esp + 0x14], ecx
jle 0x4996ad
mov edx, dword [ebp + 0xc]
add edx, 8
mov dword [esp + 0x24], edx
mov eax, 1
xor edx, edx
call sub.ntdll.dll__allshl
mov ecx, edx
mov dword [esp + 0x48], eax
and eax, dword [esp + 0x18]
mov dword [esp + 0x4c], ecx
and ecx, dword [esp + 0x1c]
or eax, ecx
jne 0x49968d
mov eax, dword [esp + 0x24]
mov eax, dword [eax]
call fcn.004518c0
mov esi, eax
test esi, esi
je 0x49968d
mov al, byte [esi]
cmp al, 0xa7
je 0x4995ca
cmp al, 0xa9
jne 0x49968d
mov ecx, dword [esp + 0x34]
cmp dword [esi + 0x1c], ecx
jne 0x49968d
mov ecx, dword [esp + 0x44]
mov eax, dword [esp + 0x40]
movzx edx, word [esp + 0x3c]
not ecx
push ecx
mov ecx, dword [esp + 0x38]
not eax
push eax
movsx eax, word [esi + 0x20]
push eax
mov eax, dword [ebp + 8]
push ecx
add eax, 0x50
push eax
xor ecx, ecx
call fcn.00494b10
mov edi, eax
add esp, 0x14
test edi, edi
je 0x49968d
movzx eax, word [edi + 0xc]
cmp ax, 1
jne 0x499644
mov ecx, dword [esp + 0x10]
movzx edx, word [ecx + 0x30]
xor eax, eax
test edx, edx
jle 0x499640
mov ecx, dword [ecx + 0x38]
cmp edi, dword [ecx]
je 0x499640
mov ebx, dword [esp + 0x10]
movzx ebx, word [ebx + 0x30]
add eax, 1
add ecx, 4
cmp eax, ebx
jl 0x49962a
cmp eax, edx
jge 0x49968d
movzx eax, word [edi + 0xc]
test al, 0x82
je 0x49967d
cmp word [esi + 0x20], 0
jl 0x49967d
mov edx, dword [ebp + 8]
mov eax, dword [esp + 0x24]
mov esi, dword [edx]
mov ecx, dword [eax]
call fcn.00451aa0
mov ebx, eax
mov eax, dword [edi]
call fcn.00451bf0
test eax, eax
je 0x49968d
mov eax, dword [eax]
mov edx, dword [ebx]
call fcn.0041cd90
test eax, eax
jne 0x49968d
mov ecx, dword [esp + 0x48]
mov edx, dword [esp + 0x4c]
or dword [esp + 0x18], ecx
or dword [esp + 0x1c], edx
mov ecx, dword [esp + 0x14]
add dword [esp + 0x24], 0x14
add ecx, 1
cmp ecx, dword [esp + 0x2c]
mov dword [esp + 0x14], ecx
jl 0x499581
mov edx, dword [esp + 0x10]
xor ebx, ebx
mov ecx, dword [edx + 0x2c]
test ecx, 0x1000
jne 0x499a2e
test ecx, 0x100
je 0x4996d3
mov dword [esp + 0x24], ebx
mov dword [esp + 0x64], ebx
mov eax, 1
jmp 0x499710
mov esi, dword [edx + 0x20]
cmp esi, ebx
mov dword [esp + 0x24], esi
je 0x499450
test byte [esi + 0x38], 4
jne 0x499450
cmp byte [esi + 0x36], 0
movzx eax, word [esi + 0x32]
mov dword [esp + 0x64], eax
movzx eax, word [esi + 0x34]
je 0x49970b
test ecx, 0x8000
mov byte [esp + 0xd], 1
je 0x499710
mov byte [esp + 0xd], 0
movzx eax, ax
cmp eax, ebx
mov byte [esp + 0x22], 0
mov byte [esp + 0x23], 0
mov byte [esp + 0x21], 0
mov dword [esp + 0x14], ebx
mov dword [esp + 0x6c], eax
jle 0x499a2e
mov dword [esp + 0x28], ebx
jmp 0x499740
movzx edi, word [edx + 0x18]
cmp ebx, edi
mov byte [esp + 0xe], 1
jge 0x4997b1
movzx ecx, word [edx + 0x32]
cmp ebx, ecx
jl 0x4997b1
mov edx, dword [edx + 0x38]
mov eax, dword [edx + ebx*4]
movzx ecx, word [eax + 0xc]
mov esi, ecx
and esi, dword [esp + 0x3c]
test si, si
je 0x499780
test ecx, 0x180
je 0x499a0f
mov byte [esp + 0xd], 0
jmp 0x499a0f
test cl, 1
je 0x4997b1
mov esi, dword [eax]
lea eax, [ebx + 1]
cmp eax, edi
jge 0x4997b1
lea ecx, [edx + ebx*4 + 4]
mov edx, dword [ecx]
cmp dword [edx], esi
je 0x4997ac
mov edx, dword [esp + 0x10]
movzx edx, word [edx + 0x18]
add eax, 1
add ecx, 4
cmp eax, edx
jl 0x499792
jmp 0x4997b1
mov byte [esp + 0xe], 0
mov edx, dword [esp + 0x24]
test edx, edx
je 0x4997de
mov ecx, dword [edx + 0x1c]
mov cl, byte [ebx + ecx]
mov eax, dword [edx + 4]
movsx eax, word [eax + ebx*2]
and cl, 1
mov byte [esp + 0xf], cl
mov ecx, dword [edx + 0xc]
movsx ecx, word [ecx + 0x20]
cmp eax, ecx
mov dword [esp + 0x38], eax
jne 0x4997ea
jmp 0x4997e3
mov byte [esp + 0xf], 0
or eax, 0xffffffff
mov dword [esp + 0x38], eax
cmp byte [esp + 0xd], 0
je 0x49981a
test eax, eax
jl 0x499810
cmp ebx, edi
jl 0x499810
mov edx, dword [edx + 0xc]
mov edx, dword [edx + 4]
mov ecx, eax
shl ecx, 4
test byte [edx + ecx + 4], 0xf
jne 0x499810
mov byte [esp + 0xd], 0
cmp eax, 0xfffffffe
jne 0x49981a
mov byte [esp + 0xd], 0
xor edi, edi
cmp byte [esp + 0xe], 0
je 0x49992c
mov ebx, dword [ebp + 0xc]
add ebx, 8
lea ecx, [ecx]
cmp edi, dword [esp + 0x2c]
jge 0x49992c
mov eax, 1
xor edx, edx
mov ecx, edi
call sub.ntdll.dll__allshl
and eax, dword [esp + 0x18]
and edx, dword [esp + 0x1c]
or eax, edx
jne 0x49991b
mov eax, dword [ebx]
test eax, eax
je 0x49991b
mov ecx, dword [eax + 4]
test ecx, 0x82000
je 0x499889
test ecx, 0x80000
je 0x49987d
mov eax, dword [eax + 0x14]
mov eax, dword [eax + 8]
jmp 0x499880
mov eax, dword [eax + 0xc]
test eax, eax
jne 0x499862
jmp 0x49991b
test eax, eax
je 0x49991b
test byte [ebp + 0x14], 0xc0
jne 0x49989c
mov byte [esp + 0xe], 0
mov esi, dword [esp + 0x38]
cmp esi, 0xffffffff
jl 0x4998c2
mov cl, byte [eax]
cmp cl, 0xa7
je 0x4998b1
cmp cl, 0xa9
jne 0x49991b
mov ecx, dword [esp + 0x34]
cmp dword [eax + 0x1c], ecx
jne 0x49991b
movsx edx, word [eax + 0x20]
cmp edx, esi
jmp 0x4998e0
mov ecx, dword [esp + 0x24]
mov edx, dword [ecx + 0x28]
mov ecx, dword [esp + 0x28]
mov ecx, dword [edx + ecx + 8]
mov edx, dword [esp + 0x34]
push edx
call fcn.00459220
add esp, 4
test eax, eax
jne 0x49991b
cmp esi, 0xffffffff
je 0x499957
mov eax, dword [ebp + 8]
mov esi, dword [eax]
mov ecx, dword [ebx]
push esi
call fcn.004518f0
mov ecx, eax
add esp, 4
test ecx, ecx
jne 0x499902
mov ecx, dword [esi]
mov ecx, dword [ecx + 8]
mov edx, dword [esp + 0x24]
mov eax, dword [edx + 0x20]
mov edx, dword [esp + 0x14]
mov eax, dword [eax + edx*4]
mov edx, dword [ecx]
call fcn.0041cd90
test eax, eax
je 0x499957
add edi, 1
add ebx, 0x14
cmp byte [esp + 0xe], 0
jne 0x499830
mov eax, dword [esp + 0x14]
test eax, eax
je 0x49993d
movzx edx, word [esp + 0x64]
cmp eax, edx
jge 0x499942
mov byte [esp + 0xd], 0
cmp byte [esp + 0x21], 0
je 0x499a2e
mov byte [esp + 0xd], 1
jmp 0x499a39
cmp word [esp + 0x70], 0
je 0x49996e
mov eax, dword [esp + 0x14]
mov ecx, dword [esp + 0x10]
add eax, 1
mov word [ecx + 0x1e], ax
test byte [ebp + 0x14], 0x40
jne 0x4999c3
cmp byte [esp + 0x22], 0
mov eax, dword [ebp + 0xc]
lea edx, [edi + edi*4]
je 0x499996
mov cl, byte [eax + edx*4 + 0x10]
mov al, byte [esp + 0xf]
xor al, byte [esp + 0x23]
and cl, 1
cmp al, cl
jne 0x49992c
jmp 0x4999c3
mov al, byte [eax + edx*4 + 0x10]
and al, 1
xor al, byte [esp + 0xf]
mov byte [esp + 0x23], al
je 0x4999be
mov ecx, dword [esp + 0x30]
mov eax, 1
xor edx, edx
call sub.ntdll.dll__allshl
mov ecx, dword [ebp + 0x20]
or dword [ecx], eax
or dword [ecx + 4], edx
mov byte [esp + 0x22], 1
mov edx, dword [ebp + 0xc]
lea ecx, [edi + edi*4]
test byte [edx + ecx*4 + 0x10], 2
je 0x4999e9
mov eax, dword [esp + 0x10]
movzx ecx, word [eax + 0x18]
cmp dword [esp + 0x14], ecx
jne 0x49992c
or dword [eax + 0x2c], 0x80000
cmp dword [esp + 0x38], 0xffffffff
jne 0x4999f5
mov byte [esp + 0x21], 1
mov eax, 1
xor edx, edx
mov ecx, edi
call sub.ntdll.dll__allshl
or dword [esp + 0x18], eax
or dword [esp + 0x1c], edx
mov ebx, dword [esp + 0x14]
add dword [esp + 0x28], 0x14
add ebx, 1
cmp ebx, dword [esp + 0x6c]
mov dword [esp + 0x14], ebx
jge 0x499942
mov edx, dword [esp + 0x10]
jmp 0x499740
cmp byte [esp + 0xd], 0
je 0x499b51
mov eax, dword [esp + 0x10]
mov ecx, dword [eax + 8]
or dword [esp + 0x50], ecx
mov edx, dword [eax + 0xc]
or dword [esp + 0x54], edx
xor ecx, ecx
cmp dword [esp + 0x2c], ecx
mov dword [esp + 0x14], ecx
jle 0x499b51
mov eax, dword [ebp + 0xc]
add eax, 8
mov dword [esp + 0x28], eax
mov eax, 1
xor edx, edx
call sub.ntdll.dll__allshl
mov ecx, edx
mov dword [esp + 0x48], eax
and eax, dword [esp + 0x18]
mov dword [esp + 0x4c], ecx
and ecx, dword [esp + 0x1c]
or eax, ecx
jne 0x499b37
mov ecx, dword [esp + 0x28]
mov eax, dword [ebp + 8]
mov edi, dword [ecx]
add eax, 0x1f0
test edi, edi
je 0x499ac7
cmp byte [edi], 0xa7
jne 0x499ab2
test byte [edi + 4], 0x20
jne 0x499ab2
mov esi, dword [edi + 0x1c]
call fcn.004946b0
jmp 0x499acb
test dword [edi + 4], 0x810000
jne 0x499ac7
push edi
push eax
call fcn.004941a0
add esp, 8
jmp 0x499acb
xor eax, eax
xor edx, edx
mov esi, eax
mov ebx, edx
mov edx, esi
or edx, ebx
jne 0x499b13
test edi, edi
mov word [esp + 0x88], 1
mov dword [esp + 0x78], 0x453d60
mov dword [esp + 0x7c], 0x453c30
mov dword [esp + 0x8c], edx
je 0x499b13
lea eax, [esp + 0x74]
push edi
push eax
call fcn.0044e710
add esp, 8
cmp word [esp + 0x88], 0
je 0x499b37
mov eax, dword [esp + 0x50]
mov ecx, dword [esp + 0x54]
not eax
not ecx
and eax, esi
and ecx, ebx
or eax, ecx
jne 0x499b37
mov ecx, dword [esp + 0x48]
mov edx, dword [esp + 0x4c]
or dword [esp + 0x18], ecx
or dword [esp + 0x1c], edx
mov ecx, dword [esp + 0x14]
add dword [esp + 0x28], 0x14
add ecx, 1
cmp ecx, dword [esp + 0x2c]
mov dword [esp + 0x14], ecx
jl 0x499a65
add dword [esp + 0x30], 1
cmp byte [esp + 0xd], 0
jne 0x4994c0
jmp 0x499b78
cmp byte [edx + 0x20], 0
je 0x499b78
mov eax, dword [ebp + 0x14]
and eax, 0x280
cmp eax, 0x80
jne 0x499b8c
mov edi, dword [esp + 0x18]
cmp edi, dword [esp + 0x58]
jne 0x499b97
mov eax, dword [esp + 0x5c]
cmp dword [esp + 0x1c], eax
jne 0x499b97
mov al, byte [esp + 0x68]
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
cmp byte [esp + 0xd], 0
jne 0x499bf7
mov ebx, dword [esp + 0x2c]
add ebx, 0xffffffff
test ebx, ebx
jle 0x499450
cmp ebx, 0x40
jge 0x499bc8
mov eax, 1
xor edx, edx
mov ecx, ebx
call sub.ntdll.dll__allshl
add eax, 0xffffffff
adc edx, 0xffffffff
jmp 0x499bcc
xor eax, eax
xor edx, edx
mov ecx, eax
mov esi, edx
and esi, dword [esp + 0x1c]
and ecx, edi
cmp ecx, eax
jne 0x499bde
cmp esi, edx
je 0x499bee
sub ebx, 1
test ebx, ebx
jg 0x499bad
xor al, al
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov al, bl
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
pop edi
pop esi
or al, 0xff
pop ebx
mov esp, ebp
pop ebp
ret