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

Disassembly:
mov eax, dword fs:[0]
push 0xffffffffffffffff
push 0x4d4428
push eax
mov dword fs:[0], esp
sub esp, 0x60
push ebx
push ebp
push esi
mov esi, ecx
push edi
mov ebx, dword [esi + 0x230]
lea edi, [esi + 0x158]
push edi
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov edx, dword [esi + 0x150]
xor eax, eax
cmp ebx, edx
push edi
sete al
mov ebp, eax
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
xor ebx, ebx
cmp ebp, ebx
je 0x4a6c82
mov cl, byte [esp + 0x13]
mov ebp, dword [esi + 0x184]
mov byte [esp + 0x18], cl
push ebx
lea ecx, [esp + 0x1c]
call fcn.00406ad6
mov dword [esp + 0x28], ebx
mov dword [esp + 0x2c], ebx
mov ecx, 0x10
xor eax, eax
lea edi, [esp + 0x30]
mov dword [esp + 0x78], ebx
rep stosd dword es:[edi], eax
lea ecx, [esp + 0x59]
lea eax, [esi + 0x19a]
mov edi, 3
mov dl, byte [eax]
add eax, 2
mov byte [ecx - 1], dl
xor edx, edx
mov dl, byte [eax - 1]
mov byte [ecx], dl
add ecx, 2
dec edi
jne 0x4a69f1
mov eax, dword [esi]
mov ecx, esi
call dword [eax + 0x78]
test eax, eax
je 0x4a6a46
mov ecx, esi
call fcn.004a7460
test eax, eax
je 0x4a6a46
cmp dword [esi + 0x250], 2
jne 0x4a6a46
lea ecx, [esp + 0x14]
mov word [esp + 0x6c], bx
push ecx
mov ecx, esi
call fcn.004a8730
mov edx, dword [esp + 0x14]
and edx, 0xffff
mov dword [esp + 0x34], edx
jmp 0x4a6aa3
mov eax, dword [esi]
mov ecx, esi
call dword [eax + 0x78]
test eax, eax
je 0x4a6a91
mov ecx, 0x5040a8
call fcn.0042cea0
test eax, eax
je 0x4a6a91
mov ecx, dword [0x504190]
call fcn.00462240
test eax, eax
je 0x4a6a91
lea ecx, [esp + 0x14]
mov word [esp + 0x6c], 3
push ecx
mov ecx, esi
call fcn.004a8730
mov edx, dword [esp + 0x14]
and edx, 0xffff
mov dword [esp + 0x34], edx
jmp 0x4a6aa3
xor eax, eax
mov word [esp + 0x6c], bx
mov ax, word [ebp + 0x112]
mov dword [esp + 0x34], eax
mov ecx, dword [esi + 0x22c]
xor edx, edx
mov dword [esp + 0x30], ecx
mov dx, word [ebp + 0x114]
and edx, 0x8000001f
jns 0x4a6ac3
dec edx
or edx, 0xffffffe0
inc edx
mov ax, word [ebp + 0x110]
and edx, 0xffff
shl ax, 5
and eax, 0xffff
or edx, eax
mov dword [esp + 0x38], edx
mov cx, word [ebp + 0x110]
mov word [esp + 0x48], cx
mov dx, word [ebp + 0x10]
mov word [esp + 0x4a], dx
mov ax, word [ebp + 0x12]
mov word [esp + 0x4c], ax
xor edx, edx
movzx cx, byte [ebp + 0x18]
mov word [esp + 0x4e], cx
mov dl, byte [ebp + 0x4c]
mov dword [esp + 0x50], edx
mov eax, dword [ebp + 0x20]
and al, 0xf0
mov dword [esp + 0x3c], eax
mov ecx, dword [ebp + 0x24]
mov eax, dword [esi]
and ecx, 0xfffffffc
mov dword [esp + 0x40], ecx
mov edx, dword [ebp + 0x28]
and edx, 0xfffffffc
mov ecx, esi
mov dword [esp + 0x44], edx
call dword [eax + 0xe4]
mov ecx, dword [esi + 0xe4]
push 0x4a
mov word [esp + 0x66], ax
call fcn.00450a40
cmp eax, ebx
je 0x4a6bb0
mov ecx, eax
call fcn.00455060
cmp ax, 1
mov word [esp + 0x5e], ax
mov word [esp + 0x60], ax
je 0x4a6b7f
cmp ax, 2
je 0x4a6b7f
cmp ax, 3
je 0x4a6b76
cmp ax, 4
jne 0x4a6b86
mov word [esp + 0x5e], 0x64
jmp 0x4a6b86
mov word [esp + 0x5e], 0xa
cmp ax, 1
je 0x4a6ba7
cmp ax, 3
je 0x4a6ba7
cmp ax, 2
je 0x4a6b9e
cmp ax, 4
jne 0x4a6bfe
mov word [esp + 0x60], 2
jmp 0x4a6bfe
mov word [esp + 0x60], 1
jmp 0x4a6bfe
mov ecx, dword [esi + 0xe4]
push 0xbd4
call fcn.00450a40
cmp eax, ebx
je 0x4a6bd2
mov ecx, eax
call fcn.00455060
mov word [esp + 0x5e], ax
jmp 0x4a6bd7
mov word [esp + 0x5e], bx
mov ecx, dword [esi + 0xe4]
push 0xbc8
call fcn.00450a40
cmp eax, ebx
je 0x4a6bf9
mov ecx, eax
call fcn.00455060
mov word [esp + 0x60], ax
jmp 0x4a6bfe
mov word [esp + 0x60], bx
mov edx, dword [esi]
mov ecx, esi
call dword [edx + 0xe4]
mov edx, dword [esi]
mov word [esp + 0x62], ax
xor eax, eax
mov ecx, esi
mov ax, word [esi + 0x228]
mov dword [esp + 0x64], eax
call dword [edx + 0x1b8]
mov ecx, dword [esi + 0x18c]
mov dword [esp + 0x68], eax
lea edx, [esp + 0x30]
mov eax, dword [ecx]
push edx
call dword [eax + 0x38]
mov eax, dword [esp + 0x28]
cmp eax, ebx
je 0x4a6c4d
push eax
call fcn.004be17b
add esp, 4
mov dword [esp + 0x28], ebx
mov ecx, dword [esp + 0x1c]
cmp ecx, ebx
je 0x4a6c82
mov al, byte [ecx - 1]
cmp al, bl
je 0x4a6c78
cmp al, 0xff
je 0x4a6c78
pop edi
dec al
pop esi
pop ebp
mov byte [ecx - 1], al
pop ebx
mov ecx, dword [esp + 0x60]
mov dword fs:[0], ecx
add esp, 0x6c
ret
dec ecx
push ecx
call fcn.004be17b
add esp, 4
mov ecx, dword [esp + 0x70]
pop edi
pop esi
pop ebp
pop ebx
mov dword fs:[0], ecx
add esp, 0x6c
ret