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

Disassembly:
sub esp, 0x8c
mov eax, dword [0x57f7c4]
xor eax, esp
mov dword [esp + 0x84], eax
push ebx
push ebp
mov ebp, dword [esp + 0x98]
push esi
push edi
lea eax, [ebp + 0xa98]
push eax
mov byte [esp + 0x17], 0
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov eax, dword [ebp + 0xa90]
mov ebx, dword [eax + 4]
mov dword [ebp + 0xa94], ebx
cmp ebx, eax
je 0x4976fd
test ebx, ebx
je 0x4976fd
mov esi, dword [ebx + 0x34]
fld qword [0x574078]
movzx eax, word [esi + 0x32]
add eax, 0xffffffc3
mov dword [esp + 0x18], esi
cmp eax, 0x20
ja case.0x497214.62
movzx eax, byte [eax + 0x497784]
jmp dword [eax*4 + 0x49776c]
movzx eax, word [esi + 0x8e]
mov edi, dword [esp + 0xa4]
test ax, ax
je 0x49725f
mov ecx, edi
sub ecx, dword [ebx + 0x24]
mov dword [esp + 0x18], ecx
fild dword [esp + 0x18]
test ecx, ecx
jge 0x497245
fadd qword [0x574070]
fdiv st(1)
movzx edx, ax
mov dword [esp + 0x14], edx
fild dword [esp + 0x14]
fmulp st(1)
call fcn.005250c0
mov dword [esp + 0x28], eax
jmp 0x497267
mov dword [esp + 0x28], 0
movzx eax, word [esi + 0x90]
test ax, ax
je 0x4972a4
mov ecx, edi
sub ecx, dword [ebx + 0x24]
mov dword [esp + 0x18], ecx
fild dword [esp + 0x18]
test ecx, ecx
jge 0x49728a
fadd qword [0x574070]
fdiv st(1)
movzx edx, ax
mov dword [esp + 0x14], edx
fild dword [esp + 0x14]
fmulp st(1)
call fcn.005250c0
mov dword [esp + 0x2c], eax
jmp 0x4972ac
mov dword [esp + 0x2c], 0
movzx eax, word [esi + 0x92]
test ax, ax
je 0x4972e7
sub edi, dword [ebx + 0x24]
mov dword [esp + 0x18], edi
fild dword [esp + 0x18]
test edi, edi
jge 0x4972cd
fadd qword [0x574070]
fdivrp st(1)
movzx eax, ax
mov dword [esp + 0x14], eax
fild dword [esp + 0x14]
fmulp st(1)
call fcn.005250c0
mov dword [esp + 0x30], eax
jmp 0x4972f1
fstp st(0)
mov dword [esp + 0x30], 0
lea eax, [esp + 0x28]
mov edi, ebp
call fcn.0045c6c0
mov ecx, dword [esp + 0xa4]
mov dword [ebx + 0x24], ecx
movzx ecx, word [ebx + 0xc]
mov eax, dword [ebp + 0xdc]
mov word [esp + 0x3a], cx
movzx ecx, word [esp + 0x28]
mov edx, 0x50f
mov word [esp + 0x3d], cx
movzx ecx, word [esp + 0x30]
mov word [esp + 0x34], dx
mov dl, byte [ebx + 0x10]
mov word [esp + 0x41], cx
mov ecx, dword [ebp + 0xe0]
mov byte [esp + 0x3c], dl
mov dx, word [esp + 0x2c]
mov dword [esp + 0x36], eax
mov word [esp + 0x3f], dx
test ecx, ecx
je 0x4976d5
fld dword [0x574168]
push 5
push 0
push eax
push ecx
fstp dword [esp]
lea edx, [ebp + 0xd0]
push edx
push 0xf
lea eax, [esp + 0x4c]
push eax
push ecx
call fcn.00427cf0
jmp 0x4976d5
mov edx, dword [esp + 0xa4]
fstp st(0)
sub edx, dword [ebx + 0x24]
lea ecx, [ebx + 0x28]
push ecx
push edx
mov eax, esi
lea edi, [esp + 0x24]
mov ecx, ebp
call fcn.00495b60
cmp dword [ebx + 0x30], 0
mov eax, dword [esp + 0xa4]
mov dword [ebx + 0x24], eax
je 0x4975ff
movzx ecx, byte [esi + 0x30]
mov eax, ebp
call fcn.0045a150
test al, al
je 0x4975ff
mov eax, dword [ebp + 0xe0]
test eax, eax
je 0x497696
mov ecx, dword [ebx + 0x2c]
cmp ecx, 2
jne 0x4974fe
mov ecx, dword [ebx + 0x30]
lea edx, [esp + 0x14]
push edx
lea esi, [eax + 0xac]
mov dword [esp + 0x18], ecx
call fcn.0041e1d0
test eax, eax
je 0x497423
mov edx, dword [esp + 0x18]
movzx edx, byte [edx + 0x30]
mov eax, dword [eax + 0xd4]
imul edx, edx, 0x2c
mov edx, dword [edx + ebp + 0x13c0]
xor ecx, ecx
add eax, 0x55
movzx esi, byte [eax]
cmp esi, edx
je 0x49747a
inc ecx
inc eax
cmp ecx, 6
jl 0x497415
mov ecx, dword [ebp + 0xdc]
mov dx, word [ebx + 0xc]
mov eax, 0x50f
mov word [esp + 0x74], ax
mov al, byte [ebx + 0x10]
mov dword [esp + 0x76], ecx
xor ecx, ecx
mov byte [esp + 0x7c], al
xor eax, eax
mov word [esp + 0x7d], cx
mov word [esp + 0x7a], dx
push 0xf
lea ecx, [esp + 0x78]
xor edx, edx
mov word [esp + 0x85], ax
push ecx
mov eax, ebp
mov word [esp + 0x87], dx
call fcn.004d56d0
mov byte [esp + 0x13], 1
jmp 0x4976d5
mov ecx, dword [ebx + 0x30]
lea eax, [esp + 0x1c]
push eax
push ecx
mov ecx, dword [ebx + 0x2c]
mov edi, ebp
call fcn.004583f0
test al, al
je 0x4974a2
mov edx, dword [ebx + 0x30]
mov eax, dword [ebx + 0x2c]
push 0
push edx
push eax
mov ecx, ebp
call fcn.004654c0
mov edx, dword [ebp + 0xdc]
movzx eax, word [ebx + 0xc]
mov ecx, 0x50f
mov dword [esp + 0x56], edx
mov dx, word [esp + 0x1c]
mov word [esp + 0x5a], ax
movzx eax, word [esp + 0x20]
mov word [esp + 0x54], cx
mov cl, byte [ebx + 0x10]
mov word [esp + 0x5d], dx
push 0xf
lea edx, [esp + 0x58]
mov byte [esp + 0x60], cl
mov cx, word [esp + 0x28]
mov word [esp + 0x63], ax
push edx
xor edx, edx
mov eax, ebp
mov word [esp + 0x69], cx
call fcn.004d56d0
mov byte [esp + 0x13], 1
jmp 0x4976d5
cmp ecx, 1
jne 0x497696
mov eax, dword [ebp + 0xdc]
mov cx, word [ebx + 0xc]
mov dword [esp + 0x46], eax
mov edx, 0x50f
xor eax, eax
mov word [esp + 0x44], dx
mov dl, byte [ebx + 0x10]
mov word [esp + 0x4d], ax
push 0xf
lea eax, [esp + 0x48]
mov word [esp + 0x4e], cx
mov byte [esp + 0x50], dl
xor ecx, ecx
xor edx, edx
push eax
mov eax, ebp
mov word [esp + 0x57], cx
mov word [esp + 0x59], dx
call fcn.004d56d0
mov ecx, dword [ebx + 0x30]
push ecx
mov ecx, dword [ebp + 0xe0]
call fcn.0041c6e0
mov edi, eax
test edi, edi
je 0x497696
mov eax, dword [ebp + 0xdc]
lea edx, [esp + 0x1c]
push edx
push eax
mov ecx, 1
call fcn.004583f0
test al, al
je 0x497593
mov ecx, dword [ebp + 0xdc]
push 0
push ecx
push 1
mov ecx, edi
call fcn.004654c0
mov eax, dword [ebp + 0xdc]
mov ecx, dword [ebx + 0x30]
mov edx, 0x515
mov word [esp + 0x84], dx
mov dx, word [esp + 0x1c]
mov dword [esp + 0x86], eax
mov ax, word [esp + 0x20]
mov word [esp + 0x8e], dx
push 0x10
lea edx, [esp + 0x88]
mov dword [esp + 0x8e], ecx
mov cx, word [esp + 0x28]
mov word [esp + 0x94], ax
push edx
mov edx, dword [edi + 0xdc]
mov eax, ebp
mov word [esp + 0x9a], cx
call fcn.004d56d0
mov byte [esp + 0x13], 1
jmp 0x4976d5
mov ecx, dword [ebx + 0x30]
lea eax, [esp + 0x1c]
push eax
push ecx
mov ecx, dword [ebx + 0x2c]
mov edi, ebp
call fcn.004583f0
test al, al
je 0x497627
mov edx, dword [ebx + 0x30]
mov eax, dword [ebx + 0x2c]
push 0
push edx
push eax
mov ecx, ebp
call fcn.004654c0
movzx edx, word [ebx + 0xc]
mov eax, dword [ebp + 0xdc]
mov ecx, 0x50f
mov word [esp + 0x64], cx
mov cl, byte [ebx + 0x10]
mov word [esp + 0x6a], dx
movzx edx, word [esp + 0x1c]
mov byte [esp + 0x6c], cl
mov cx, word [esp + 0x20]
mov word [esp + 0x6d], dx
movzx edx, word [esp + 0x24]
mov word [esp + 0x6f], cx
mov ecx, dword [ebp + 0xe0]
mov dword [esp + 0x66], eax
mov word [esp + 0x71], dx
test ecx, ecx
je 0x497696
fld dword [0x574168]
push 5
push 0
push eax
push ecx
fstp dword [esp]
lea eax, [ebp + 0xd0]
push eax
push 0xf
lea edx, [esp + 0x7c]
push edx
push ecx
call fcn.00427cf0
mov byte [esp + 0x13], 1
jmp 0x4976d5
mov eax, dword [esp + 0xa4]
fstp st(0)
push ebx
push eax
push ebp
mov ecx, esi
call fcn.00496a60
jmp 0x4976d5
mov edx, dword [esp + 0xa4]
fstp st(0)
mov ecx, esi
push ebx
mov esi, ebp
call fcn.00496300
jmp 0x4976d5
push esi
fstp st(0)
mov edi, ebp
call fcn.00496880
jmp 0x4976d5
fstp st(0)
cmp dword [ebp + 0x1444], 1
je 0x4976fd
mov ecx, dword [ebp + 0xa94]
mov ebx, dword [ecx + 4]
mov dword [ebp + 0xa94], ebx
cmp ebx, dword [ebp + 0xa90]
je 0x4976fd
test ebx, ebx
jne 0x4971f0
lea eax, [ebp + 0xa98]
push eax
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
cmp dword [ebp + 0x1438], 0
je 0x497732
call dword [sym.imp.KERNEL32.dll_GetTickCount]
cmp dword [ebp + 0x1438], eax
jae 0x497732
mov ecx, ebp
mov dword [ebp + 0x1438], 0
call fcn.00491600
cmp byte [esp + 0x13], 0
je 0x49774f
cmp dword [ebp + 0x1444], 1
je 0x49774f
push ebp
call fcn.00499ef0
mov ecx, ebp
call fcn.00499d00
mov ecx, dword [esp + 0x94]
pop edi
pop esi
pop ebp
pop ebx
xor ecx, esp
call fcn.0051a8be
add esp, 0x8c
ret 8