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

Disassembly:
push ebp
mov ebp, esp
mov ecx, 0x2f
push 0
push 0
dec ecx
jne 0x4987f4
push ecx
push ebx
push esi
push edi
mov ebx, edx
mov dword [ebp - 8], eax
xor eax, eax
push ebp
push 0x4993ce
push dword fs:[eax]
mov dword fs:[eax], esp
mov ecx, ebx
mov dl, 1
mov eax, dword [0x4978cc]
call fcn.00497950
mov edx, dword [ebp - 8]
mov dword [edx + 0x88], eax
mov eax, dword [ebp - 8]
call fcn.0049846c
push 0
push 0
mov eax, dword [ebp - 8]
mov eax, dword [eax + 0x88]
mov edx, dword [eax]
call dword [edx + 8]
xor edx, edx
push ebp
push 0x499378
push dword fs:[edx]
mov dword fs:[edx], esp
mov eax, dword [ebp - 8]
mov eax, dword [eax + 0x88]
call fcn.004121b0
cmp ax, 0xd8ff
jne 0x49936e
push 9
lea edx, [ebp - 0x12]
mov eax, dword [ebp - 8]
mov eax, dword [eax + 0x88]
mov ecx, 0x7ffffffe
call fcn.00412134
cmp word [ebp - 0x12], 0xe0ff
jne 0x4988b3
push 0
push 0x14
mov eax, dword [ebp - 8]
mov eax, dword [eax + 0x88]
mov edx, dword [eax]
call dword [edx + 8]
push 9
lea edx, [ebp - 0x12]
mov eax, dword [ebp - 8]
mov eax, dword [eax + 0x88]
mov ecx, 0x7ffffffe
call fcn.00412134
cmp word [ebp - 0x12], 0xe1ff
je 0x49897c
mov eax, 0x7d0
call fcn.00402eac
mov esi, eax
push 0x7d0
mov edx, esi
mov eax, dword [ebp - 8]
mov eax, dword [eax + 0x88]
mov ecx, 0x7ffffffe
call fcn.00412134
mov edi, eax
test edi, edi
jle 0x498975
mov eax, dword [ebp - 8]
mov ebx, dword [eax + 0x88]
mov eax, ebx
mov edx, dword [eax]
call dword [edx + 4]
push edx
push eax
mov eax, edi
cdq
sub dword [esp], eax
sbb dword [esp + 4], edx
pop eax
pop edx
push edx
push eax
mov eax, ebx
mov edx, dword [eax]
call dword [edx + 8]
xor ebx, ebx
jmp 0x49896c
lea eax, [esi + ebx]
cmp word [eax], 0xe1ff
jne 0x49896b
mov eax, dword [ebp - 8]
mov eax, dword [eax + 0x88]
mov edx, dword [eax]
call dword [edx + 4]
push edx
push eax
mov eax, ebx
cdq
add eax, dword [esp]
adc edx, dword [esp + 4]
add esp, 8
push edx
push eax
mov eax, dword [ebp - 8]
mov eax, dword [eax + 0x88]
mov edx, dword [eax]
call dword [edx + 8]
push 9
lea edx, [ebp - 0x12]
mov eax, dword [ebp - 8]
mov eax, dword [eax + 0x88]
mov ecx, 0x7ffffffe
call fcn.00412134
jmp 0x498975
inc ebx
mov eax, edi
sub eax, 2
cmp ebx, eax
jl 0x49891a
mov eax, esi
call fcn.00402ec8
cmp word [ebp - 0x12], 0xe1ff
jne 0x49936e
mov eax, dword [ebp - 8]
mov byte [eax + 0x1c], 1
mov eax, dword [ebp - 8]
mov eax, dword [eax + 0x88]
mov edx, dword [eax]
call dword [edx + 4]
inc eax
mov dword [ebp - 0x18], eax
push 0xb
lea edx, [ebp - 0x2b]
mov eax, dword [ebp - 8]
mov eax, dword [eax + 0x88]
mov ecx, 0x7ffffffe
call fcn.00412134
cmp word [ebp - 0x2a], 0x4d4d
sete al
mov edx, dword [ebp - 8]
mov byte [edx + 0x90], al
test al, al
je 0x4989e4
mov eax, dword [ebp - 0x26]
call fcn.00497c5c
mov dword [ebp - 0x26], eax
movzx eax, word [ebp - 0x22]
xchg al, ah
mov word [ebp - 0x22], ax
cmp dword [ebp - 0x26], 8
je 0x498a1e
mov eax, dword [ebp - 8]
mov ebx, dword [eax + 0x88]
mov eax, ebx
mov edx, dword [eax]
call dword [edx + 4]
push edx
push eax
mov eax, dword [ebp - 0x26]
cdq
xor eax, edx
sub eax, edx
cdq
add eax, dword [esp]
adc edx, dword [esp + 4]
add esp, 8
sub eax, 8
sbb edx, 0
push edx
push eax
mov eax, ebx
mov edx, dword [eax]
call dword [edx + 8]
cmp word [ebp - 0x22], 0
jne 0x498a2b
mov word [ebp - 0x22], 0x64
movzx eax, word [ebp - 0x22]
test eax, eax
jle 0x498ca7
mov dword [ebp - 0x20], eax
lea edx, [ebp - 0x37]
mov eax, dword [ebp - 8]
call fcn.00497c60
movzx eax, word [ebp - 0x37]
cmp eax, 0x11b
jg 0x498a98
je 0x498c5c
cmp eax, 0x110
jg 0x498a7f
je 0x498b30
sub eax, 1
jb 0x498ca7
sub eax, 0x10d
je 0x498ae0
dec eax
je 0x498b08
jmp 0x498c9e
sub eax, 0x112
je 0x498b58
sub eax, 8
je 0x498c46
jmp 0x498c9e
cmp eax, 0x8298
jg 0x498ac5
je 0x498bc1
sub eax, 0x131
je 0x498be9
dec eax
je 0x498b99
sub eax, 9
je 0x498c11
jmp 0x498c9e
sub eax, 0x8769
je 0x498c38
sub eax, 0xb1d
je 0x498c72
jmp 0x498c9e
lea eax, [ebp - 0x3c]
push eax
mov edx, dword [ebp - 0x2f]
add edx, dword [ebp - 0x18]
mov ecx, dword [ebp - 0x33]
mov eax, dword [ebp - 8]
call fcn.00497cf0
mov edx, dword [ebp - 0x3c]
mov eax, dword [ebp - 8]
add eax, 4
call fcn.00404dd8
jmp 0x498c9e
lea eax, [ebp - 0x40]
push eax
mov edx, dword [ebp - 0x2f]
add edx, dword [ebp - 0x18]
mov ecx, dword [ebp - 0x33]
mov eax, dword [ebp - 8]
call fcn.00497cf0
mov edx, dword [ebp - 0x40]
mov eax, dword [ebp - 8]
add eax, 8
call fcn.00404dd8
jmp 0x498c9e
lea eax, [ebp - 0x44]
push eax
mov edx, dword [ebp - 0x2f]
add edx, dword [ebp - 0x18]
mov ecx, dword [ebp - 0x33]
mov eax, dword [ebp - 8]
call fcn.00497cf0
mov edx, dword [ebp - 0x44]
mov eax, dword [ebp - 8]
add eax, 0xc
call fcn.00404dd8
jmp 0x498c9e
mov eax, dword [ebp - 8]
movzx ebx, byte [ebp - 0x2f]
mov byte [eax + 0x10], bl
mov eax, ebx
dec eax
sub al, 8
jae 0x498b83
mov eax, dword [ebp - 8]
add eax, 0x14
movzx edx, bl
mov edx, dword [edx*4 + 0x515d24]
call fcn.00404dd8
jmp 0x498c9e
mov eax, dword [ebp - 8]
add eax, 0x14
mov edx, dword [0x515d48]
call fcn.00404dd8
jmp 0x498c9e
lea eax, [ebp - 0x48]
push eax
mov edx, dword [ebp - 0x2f]
add edx, dword [ebp - 0x18]
mov ecx, dword [ebp - 0x33]
mov eax, dword [ebp - 8]
call fcn.00497cf0
mov edx, dword [ebp - 0x48]
mov eax, dword [ebp - 8]
add eax, 0x20
call fcn.00404dd8
jmp 0x498c9e
lea eax, [ebp - 0x4c]
push eax
mov edx, dword [ebp - 0x2f]
add edx, dword [ebp - 0x18]
mov ecx, dword [ebp - 0x33]
mov eax, dword [ebp - 8]
call fcn.00497cf0
mov edx, dword [ebp - 0x4c]
mov eax, dword [ebp - 8]
add eax, 0x18
call fcn.00404dd8
jmp 0x498c9e
lea eax, [ebp - 0x50]
push eax
mov edx, dword [ebp - 0x2f]
add edx, dword [ebp - 0x18]
mov ecx, dword [ebp - 0x33]
mov eax, dword [ebp - 8]
call fcn.00497cf0
mov edx, dword [ebp - 0x50]
mov eax, dword [ebp - 8]
add eax, 0x7c
call fcn.00404dd8
jmp 0x498c9e
lea eax, [ebp - 0x54]
push eax
mov edx, dword [ebp - 0x2f]
add edx, dword [ebp - 0x18]
mov ecx, dword [ebp - 0x33]
mov eax, dword [ebp - 8]
call fcn.00497cf0
mov edx, dword [ebp - 0x54]
mov eax, dword [ebp - 8]
add eax, 0x80
call fcn.00404dd8
jmp 0x498c9e
mov eax, dword [ebp - 8]
mov edx, dword [ebp - 0x2f]
mov dword [eax + 0x8c], edx
jmp 0x498c9e
mov edx, dword [ebp - 0x2f]
add edx, dword [ebp - 0x18]
mov eax, dword [ebp - 8]
call fcn.00498074
mov edx, dword [ebp - 8]
mov dword [edx + 0x58], eax
jmp 0x498c9e
mov edx, dword [ebp - 0x2f]
add edx, dword [ebp - 0x18]
mov eax, dword [ebp - 8]
call fcn.00498074
mov edx, dword [ebp - 8]
mov dword [edx + 0x5c], eax
jmp 0x498c9e
mov eax, dword [ebp - 8]
cmp dword [eax + 0x2c], 0
jne 0x498c9e
lea eax, [ebp - 0x58]
push eax
mov edx, dword [ebp - 0x2f]
add edx, dword [ebp - 0x18]
mov ecx, dword [ebp - 0x33]
mov eax, dword [ebp - 8]
call fcn.00497e38
mov edx, dword [ebp - 0x58]
mov eax, dword [ebp - 8]
add eax, 0x2c
call fcn.00404dd8
dec dword [ebp - 0x20]
jne 0x498a3a
mov eax, dword [ebp - 8]
mov ecx, dword [eax + 0x8c]
test ecx, ecx
jbe 0x49936e
mov eax, ecx
xor edx, edx
push edx
push eax
mov eax, dword [ebp - 0x18]
xor edx, edx
add eax, dword [esp]
adc edx, dword [esp + 4]
add esp, 8
push edx
push eax
mov eax, dword [ebp - 8]
mov eax, dword [eax + 0x88]
mov edx, dword [eax]
call dword [edx + 8]
mov eax, dword [ebp - 8]
mov eax, dword [eax + 0x88]
call fcn.004121b0
mov edx, dword [ebp - 8]
cmp byte [edx + 0x90], 0
je 0x498cf9
xchg al, ah
movzx eax, ax
test eax, eax
jle 0x49936e
mov dword [ebp - 0x20], eax
lea edx, [ebp - 0x37]
mov eax, dword [ebp - 8]
call fcn.00497c60
movzx eax, word [ebp - 0x37]
cmp eax, 0x9202
jg 0x498d8a
je 0x498fd9
cmp eax, 0x8827
jg 0x498d5d
je 0x498fc9
sub eax, 1
jb 0x49936e
sub eax, 0x8299
je 0x498ddc
sub eax, 3
je 0x498e5d
sub eax, 0x585
je 0x499315
jmp 0x499365
sub eax, 0x9003
je 0x498e84
dec eax
je 0x498eac
sub eax, 0xfe
je 0x498e34
sub eax, 0xff
je 0x498ed4
jmp 0x499365
cmp eax, 0x920a
jg 0x498dba
je 0x498e08
sub eax, 0x9205
je 0x499006
sub eax, 2
je 0x499061
dec eax
je 0x4990bd
dec eax
je 0x499277
jmp 0x499365
sub eax, 0x9286
je 0x499033
sub eax, 0xd7c
je 0x499351
dec eax
je 0x49935c
jmp 0x499365
lea eax, [ebp - 0x5c]
push eax
mov edx, dword [ebp - 0x2f]
add edx, dword [ebp - 0x18]
xor ecx, ecx
mov eax, dword [ebp - 8]
call fcn.0049811c
mov edx, dword [ebp - 0x5c]
mov eax, dword [ebp - 8]
add eax, 0x30
mov ecx, 0x4993e4
call fcn.00405034
jmp 0x499365
lea eax, [ebp - 0x60]
push eax
mov edx, dword [ebp - 0x2f]
add edx, dword [ebp - 0x18]
xor ecx, ecx
mov eax, dword [ebp - 8]
call fcn.0049811c
mov edx, dword [ebp - 0x60]
mov eax, dword [ebp - 8]
add eax, 0x34
mov ecx, 0x4993f8
call fcn.00405034
jmp 0x499365
lea eax, [ebp - 0x64]
push eax
mov edx, dword [ebp - 0x2f]
add edx, dword [ebp - 0x18]
mov cl, 1
mov eax, dword [ebp - 8]
call fcn.0049811c
mov edx, dword [ebp - 0x64]
mov eax, dword [ebp - 8]
add eax, 0x84
call fcn.00404dd8
jmp 0x499365
lea eax, [ebp - 0x68]
push eax
mov edx, dword [ebp - 0x2f]
add edx, dword [ebp - 0x18]
mov cl, 1
mov eax, dword [ebp - 8]
call fcn.0049811c
mov edx, dword [ebp - 0x68]
mov eax, dword [ebp - 8]
add eax, 0x38
call fcn.00404dd8
jmp 0x499365
lea eax, [ebp - 0x6c]
push eax
mov edx, dword [ebp - 0x2f]
add edx, dword [ebp - 0x18]
mov ecx, dword [ebp - 0x33]
mov eax, dword [ebp - 8]
call fcn.00497cf0
mov edx, dword [ebp - 0x6c]
mov eax, dword [ebp - 8]
add eax, 0x24
call fcn.00404dd8
jmp 0x499365
lea eax, [ebp - 0x70]
push eax
mov edx, dword [ebp - 0x2f]
add edx, dword [ebp - 0x18]
mov ecx, dword [ebp - 0x33]
mov eax, dword [ebp - 8]
call fcn.00497cf0
mov edx, dword [ebp - 0x70]
mov eax, dword [ebp - 8]
add eax, 0x28
call fcn.00404dd8
jmp 0x499365
xor eax, eax
push ebp
push 0x498faf
push dword fs:[eax]
mov dword fs:[eax], esp
mov edx, dword [ebp - 0x2f]
add edx, dword [ebp - 0x18]
mov eax, dword [ebp - 8]
call fcn.00498398
fstp dword [ebp - 0x1c]
wait
fld dword [ebp - 0x1c]
fcomp dword [0x4993fc]
wait
fnstsw ax
sahf
jbe 0x498f22
fld dword [ebp - 0x1c]
fcomp dword [0x499400]
wait
fnstsw ax
sahf
jae 0x498f22
mov eax, dword [ebp - 8]
add eax, 0x3c
call fcn.00404d84
jmp 0x498fa2
fld dword [ebp - 0x1c]
fcomp dword [0x499400]
wait
fnstsw ax
sahf
jae 0x498f92
push 0x4000
push 0x80000000
push 0
fld dword [ebp - 0x1c]
add esp, 0xfffffff4
fstp xword [esp]
wait
call fcn.004303f0
add esp, 0xfffffff4
fstp xword [esp]
wait
lea ecx, [ebp - 0x170]
xor edx, edx
mov eax, 1
call fcn.00403858
lea edx, [ebp - 0x170]
lea eax, [ebp - 4]
call fcn.00404fac
push 0x49940c
push dword [ebp - 4]
push 0x4993e4
mov eax, dword [ebp - 8]
add eax, 0x3c
mov edx, 3
call fcn.004050a8
jmp 0x498fa2
mov eax, dword [ebp - 8]
add eax, 0x3c
mov edx, 0x499418
call fcn.00404dd8
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
jmp 0x499365
mov eax, dword [ebp - 8]
movzx edx, word [ebp - 0x2f]
mov word [eax + 0x78], dx
jmp 0x499365
lea eax, [ebp - 0x174]
push eax
mov edx, dword [ebp - 0x2f]
add edx, dword [ebp - 0x18]
mov cl, 1
mov eax, dword [ebp - 8]
call fcn.0049811c
mov edx, dword [ebp - 0x174]
mov eax, dword [ebp - 8]
add eax, 0x40
call fcn.00404dd8
jmp 0x499365
lea eax, [ebp - 0x178]
push eax
mov edx, dword [ebp - 0x2f]
add edx, dword [ebp - 0x18]
mov cl, 1
mov eax, dword [ebp - 8]
call fcn.0049811c
mov edx, dword [ebp - 0x178]
mov eax, dword [ebp - 8]
add eax, 0x44
call fcn.00404dd8
jmp 0x499365
lea eax, [ebp - 0x17c]
push eax
mov edx, dword [ebp - 0x2f]
add edx, dword [ebp - 0x18]
mov ecx, dword [ebp - 0x33]
mov eax, dword [ebp - 8]
call fcn.00497e38
mov edx, dword [ebp - 0x17c]
mov eax, dword [ebp - 8]
add eax, 0x2c
call fcn.00404dd8
jmp 0x499365
mov eax, dword [ebp - 8]
movzx edx, byte [ebp - 0x2f]
mov byte [eax + 0x60], dl
mov ebx, dword [ebp - 0x2f]
mov eax, ebx
sub eax, 7
jae 0x49908c
mov eax, dword [ebp - 8]
add eax, 0x64
mov edx, dword [ebx*4 + 0x515d70]
call fcn.00404dd8
jmp 0x499365
cmp ebx, 7
jne 0x4990a7
mov eax, dword [ebp - 8]
add eax, 0x64
mov edx, dword [0x515d8c]
call fcn.00404dd8
jmp 0x499365
mov eax, dword [ebp - 8]
add eax, 0x64
mov edx, dword [0x515d70]
call fcn.00404dd8
jmp 0x499365
mov eax, dword [ebp - 8]
movzx edx, byte [ebp - 0x2f]
mov byte [eax + 0x68], dl
mov eax, dword [ebp - 0x2f]
cmp eax, 0x12
jg 0x49912d
je 0x4991e4
cmp eax, 0x11
ja case.0x4990de.4
jmp dword [eax*4 + 0x4990e5]
cmp eax, 0x15
jg 0x49914d
je 0x499223
sub eax, 0x13
je 0x4991f9
dec eax
je 0x49920e
jmp case.0x4990de.4
sub eax, 0x16
je 0x499238
sub eax, 0xe9
je 0x49924d
jmp case.0x4990de.4
mov eax, dword [ebp - 8]
add eax, 0x6c
mov edx, 0x49942c
call fcn.00404dd8
jmp 0x499365
mov eax, dword [ebp - 8]
add eax, 0x6c
mov edx, 0x49943c
call fcn.00404dd8
jmp 0x499365
mov eax, dword [ebp - 8]
add eax, 0x6c
mov edx, 0x499450
call fcn.00404dd8
jmp 0x499365
mov eax, dword [ebp - 8]
add eax, 0x6c
mov edx, 0x499464
call fcn.00404dd8
jmp 0x499365
mov eax, dword [ebp - 8]
add eax, 0x6c
mov edx, 0x499478
call fcn.00404dd8
jmp 0x499365
mov eax, dword [ebp - 8]
add eax, 0x6c
mov edx, 0x499488
call fcn.00404dd8
jmp 0x499365
mov eax, dword [ebp - 8]
add eax, 0x6c
mov edx, 0x4994a4
call fcn.00404dd8
jmp 0x499365
mov eax, dword [ebp - 8]
add eax, 0x6c
mov edx, 0x4994c0
call fcn.00404dd8
jmp 0x499365
mov eax, dword [ebp - 8]
add eax, 0x6c
mov edx, 0x4994dc
call fcn.00404dd8
jmp 0x499365
mov eax, dword [ebp - 8]
add eax, 0x6c
mov edx, 0x4994e8
call fcn.00404dd8
jmp 0x499365
mov eax, dword [ebp - 8]
add eax, 0x6c
mov edx, 0x4994f4
call fcn.00404dd8
jmp 0x499365
mov eax, dword [ebp - 8]
add eax, 0x6c
mov edx, 0x499500
call fcn.00404dd8
jmp 0x499365
mov eax, dword [ebp - 8]
add eax, 0x6c
mov edx, 0x49942c
call fcn.00404dd8
jmp 0x499365
mov eax, dword [ebp - 8]
movzx edx, byte [ebp - 0x2f]
mov byte [eax + 0x70], dl
mov eax, dword [ebp - 0x2f]
cmp eax, 5
jg 0x499294
je 0x4992ca
sub eax, 1
jb 0x4992a0
je 0x4992b5
jmp 0x499303
sub eax, 7
je 0x4992df
sub eax, 0x12
je 0x4992f1
jmp 0x499303
mov eax, dword [ebp - 8]
add eax, 0x74
mov edx, 0x499510
call fcn.00404dd8
jmp 0x499365
mov eax, dword [ebp - 8]
add eax, 0x74
mov edx, 0x499478
call fcn.00404dd8
jmp 0x499365
mov eax, dword [ebp - 8]
add eax, 0x74
mov edx, 0x499524
call fcn.00404dd8
jmp 0x499365
mov eax, dword [ebp - 8]
add eax, 0x74
mov edx, 0x49953c
call fcn.00404dd8
jmp 0x499365
mov eax, dword [ebp - 8]
add eax, 0x74
mov edx, 0x499554
call fcn.00404dd8
jmp 0x499365
mov eax, dword [ebp - 8]
add eax, 0x74
mov edx, 0x499510
call fcn.00404dd8
jmp 0x499365
mov eax, dword [ebp - 8]
movzx edx, byte [ebp - 0x2f]
mov byte [eax + 0x48], dl
mov ebx, dword [ebp - 0x2f]
mov eax, ebx
dec eax
sub eax, 8
jae 0x49933e
mov eax, dword [ebp - 8]
add eax, 0x4c
mov edx, dword [ebx*4 + 0x515d48]
call fcn.00404dd8
jmp 0x499365
mov eax, dword [ebp - 8]
add eax, 0x4c
mov edx, dword [0x515d6c]
call fcn.00404dd8
jmp 0x499365
mov eax, dword [ebp - 8]
mov edx, dword [ebp - 0x2f]
mov dword [eax + 0x50], edx
jmp 0x499365
mov eax, dword [ebp - 8]
mov edx, dword [ebp - 0x2f]
mov dword [eax + 0x54], edx
dec dword [ebp - 0x20]
jne 0x498d07
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
jmp 0x499382
mov eax, dword [ebp - 8]
mov eax, dword [eax + 0x88]
call fcn.00403f90
mov eax, dword [ebp - 8]
xor edx, edx
mov dword [eax + 0x88], edx
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x4993d5
lea eax, [ebp - 0x17c]
mov edx, 3
call fcn.00404da8
lea eax, [ebp - 0x70]
mov edx, 0xe
call fcn.00404da8
lea eax, [ebp - 4]
call fcn.00404d84
ret