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

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
push 0xffffffffffffffff
push 0x4c2000
mov eax, dword fs:[0]
push eax
sub esp, 0x68
mov eax, dword [0x4e3a20]
xor eax, esp
mov dword [esp + 0x60], eax
push ebx
push esi
push edi
mov eax, dword [0x4e3a20]
xor eax, esp
push eax
lea eax, [esp + 0x78]
mov dword fs:[0], eax
mov ecx, dword [ebp + 0x30]
mov eax, dword [ebp + 0xc]
mov esi, dword [ebp + 0x18]
mov edi, dword [ebp + 0x20]
mov dword [esp + 0x3c], eax
mov dword [esp + 0x2c], esi
mov dword [esp + 0x24], ecx
test ecx, ecx
je 0x4998b4
mov al, byte [edi]
cmp al, 0x2b
je 0x4998ad
cmp al, 0x2d
jne 0x4998b4
mov ebx, 1
jmp 0x4998b6
xor ebx, ebx
mov eax, dword [esi + 0x14]
and eax, 0x3000
cmp eax, 0x3000
je 0x4998cc
mov edx, 0x4dbab8
jmp 0x4998ee
lea eax, [ebx + 2]
mov edx, 0x4dbabc
cmp eax, ecx
ja 0x4998ee
cmp byte [edi + ebx], 0x30
jne 0x4998ee
mov cl, byte [edi + ebx + 1]
cmp cl, 0x78
je 0x4998ec
cmp cl, 0x58
jne 0x4998ee
mov ebx, eax
push edx
push edi
call fcn.004a7680
mov dword [esp + 0x40], eax
mov eax, 0x2e
mov word [esp + 0x20], ax
call fcn.004a6a76
mov eax, dword [eax]
mov al, byte [eax]
mov byte [esp + 0x20], al
lea eax, [esp + 0x20]
push eax
push edi
call fcn.004a7680
add esp, 0x10
mov dword [esp + 0x14], eax
lea eax, [esp + 0x28]
push eax
mov ecx, esi
call fcn.00485ca0
push eax
mov dword [esp + 0x84], 0
call fcn.0049a370
mov dword [esp + 0x84], 0xffffffff
mov ecx, dword [esp + 0x2c]
add esp, 4
mov dword [esp + 0x1c], eax
test ecx, ecx
je 0x49996a
mov eax, dword [ecx]
call dword [eax + 8]
mov ecx, eax
test ecx, ecx
je 0x49996a
mov eax, dword [ecx]
push 1
call dword [eax]
mov ecx, dword [esp + 0x1c]
push 0x30
mov eax, dword [ecx]
call dword [eax + 0x30]
movzx eax, ax
mov dword [esp + 0x20], eax
xor eax, eax
push eax
push dword [esp + 0x28]
lea ecx, [esp + 0x48]
mov dword [esp + 0x5c], 7
mov dword [esp + 0x58], 0
mov word [esp + 0x48], ax
call fcn.0049a2d0
mov ecx, dword [esp + 0x1c]
mov dword [esp + 0x80], 1
cmp dword [esp + 0x54], 8
mov edx, dword [ecx]
lea eax, [esp + 0x40]
cmovae eax, dword [esp + 0x40]
push eax
mov eax, dword [esp + 0x28]
add eax, edi
push eax
push edi
call dword [edx + 0x2c]
lea eax, [esp + 0x28]
push eax
mov ecx, esi
call fcn.00485ca0
push eax
mov byte [esp + 0x84], 2
call fcn.0049a610
mov byte [esp + 0x84], 1
mov ecx, dword [esp + 0x2c]
add esp, 4
mov esi, eax
mov dword [esp + 0x1c], esi
test ecx, ecx
je 0x499a10
mov eax, dword [ecx]
call dword [eax + 8]
mov ecx, eax
test ecx, ecx
je 0x499a10
mov eax, dword [ecx]
push 1
call dword [eax]
lea eax, [esp + 0x58]
push eax
mov ecx, esi
call fcn.0049a1e0
mov byte [esp + 0x80], 3
mov eax, dword [esi]
mov ecx, esi
call dword [eax + 0x10]
mov ecx, dword [esp + 0x38]
push dword [esp + 0x20]
movzx eax, ax
mov dword [esp + 0x38], eax
mov eax, dword [esp + 0x18]
cmp eax, dword [esp + 0x28]
jne 0x499a4e
mov eax, dword [ebp + 0x24]
push eax
lea edi, [ecx + eax]
push ecx
jmp 0x499a9f
push dword [ebp + 0x2c]
mov esi, dword [ebp + 0x24]
push ecx
lea ecx, [esp + 0x4c]
lea edi, [eax + esi]
call fcn.00499650
push dword [esp + 0x20]
mov eax, dword [esp + 0x18]
push dword [ebp + 0x28]
inc eax
push eax
lea ecx, [esp + 0x4c]
call fcn.00499650
mov ecx, dword [esp + 0x1c]
mov eax, dword [ecx]
call dword [eax + 0xc]
cmp dword [esp + 0x54], 8
push dword [esp + 0x20]
mov edx, dword [esp + 0x18]
movzx ecx, ax
lea eax, [esp + 0x44]
cmovae eax, dword [esp + 0x44]
push esi
mov word [eax + edx*2], cx
push edx
lea ecx, [esp + 0x4c]
call fcn.00499650
cmp dword [esp + 0x6c], 0x10
lea esi, [esp + 0x58]
cmovae esi, dword [esp + 0x58]
mov al, byte [esi]
cmp al, 0x7f
je 0x499af1
lea esp, [esp]
test al, al
jle 0x499af1
movsx ecx, al
mov eax, edi
sub eax, ebx
cmp ecx, eax
jae 0x499af1
push dword [esp + 0x34]
sub edi, ecx
push 1
push edi
lea ecx, [esp + 0x4c]
call fcn.00499650
cmp byte [esi + 1], 0
lea eax, [esi + 1]
cmovg esi, eax
mov al, byte [esi]
cmp al, 0x7f
jne 0x499ac0
mov edi, dword [esp + 0x2c]
mov eax, dword [esp + 0x50]
cmp dword [edi + 0x24], 0
mov dword [esp + 0x34], eax
jl 0x499b16
jg 0x499b0b
cmp dword [edi + 0x20], 0
jbe 0x499b16
mov esi, dword [edi + 0x20]
cmp esi, eax
jbe 0x499b16
sub esi, eax
jmp 0x499b18
xor esi, esi
mov eax, dword [edi + 0x14]
and eax, 0x1c0
cmp eax, 0x40
je 0x499bca
cmp eax, 0x100
je 0x499b7d
push esi
push dword [ebp + 0x1c]
lea eax, [esp + 0x34]
push dword [ebp + 0x14]
push dword [ebp + 0x10]
push eax
push dword [ebp + 8]
call fcn.0049a170
mov ecx, eax
xor esi, esi
mov eax, dword [ecx]
cmp dword [esp + 0x6c], 8
mov dword [ebp + 0x10], eax
mov eax, dword [ecx + 4]
mov dword [ebp + 0x14], eax
push ebx
lea eax, [esp + 0x5c]
cmovae eax, dword [esp + 0x5c]
push eax
push dword [ecx + 4]
lea eax, [esp + 0x50]
push dword [ecx]
push eax
push dword [ebp + 8]
call fcn.0049a0f0
add esp, 0x30
jmp 0x499bf0
cmp dword [esp + 0x54], 8
push ebx
lea eax, [esp + 0x44]
cmovae eax, dword [esp + 0x44]
push eax
push dword [ebp + 0x14]
lea eax, [esp + 0x38]
push dword [ebp + 0x10]
push eax
push dword [ebp + 8]
call fcn.0049a0f0
mov ecx, eax
push esi
mov eax, dword [ecx]
push dword [ebp + 0x1c]
mov dword [ebp + 0x10], eax
mov eax, dword [ecx + 4]
mov dword [ebp + 0x14], eax
push dword [ecx + 4]
lea eax, [esp + 0x50]
push dword [ecx]
push eax
push dword [ebp + 8]
call fcn.0049a170
add esp, 0x30
xor esi, esi
jmp 0x499bf0
cmp dword [esp + 0x54], 8
push ebx
lea eax, [esp + 0x44]
cmovae eax, dword [esp + 0x44]
push eax
push dword [ebp + 0x14]
lea eax, [esp + 0x38]
push dword [ebp + 0x10]
push eax
push dword [ebp + 8]
call fcn.0049a0f0
add esp, 0x18
mov edx, dword [eax]
cmp dword [esp + 0x54], 8
mov ecx, dword [esp + 0x34]
mov dword [ebp + 0x10], edx
mov eax, dword [eax + 4]
mov dword [esp + 0x14], eax
mov dword [ebp + 0x14], eax
lea eax, [esp + 0x40]
cmovae eax, dword [esp + 0x40]
sub ecx, ebx
push ecx
lea eax, [eax + ebx*2]
mov ebx, dword [ebp + 8]
push eax
push dword [esp + 0x1c]
lea eax, [esp + 0x38]
push edx
push eax
push ebx
call fcn.0049a0f0
mov ecx, dword [eax]
push esi
push dword [ebp + 0x1c]
mov esi, dword [esp + 0x5c]
mov dword [ebp + 0x10], ecx
mov eax, dword [eax + 4]
push eax
push ecx
push esi
push ebx
mov dword [ebp + 0x14], eax
mov dword [edi + 0x20], 0
mov dword [edi + 0x24], 0
call fcn.0049a170
add esp, 0x30
cmp dword [esp + 0x6c], 0x10
jb 0x499c6b
push dword [esp + 0x58]
call fcn.004a37d1
add esp, 4
cmp dword [esp + 0x54], 8
mov dword [esp + 0x6c], 0xf
mov dword [esp + 0x68], 0
mov byte [esp + 0x58], 0
jb 0x499c93
push dword [esp + 0x40]
call fcn.004a37d1
add esp, 4
mov eax, esi
mov ecx, dword [esp + 0x78]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x60]
xor ecx, esp
call fcn.004a2eda
mov esp, ebp
pop ebp
ret