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

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x5c
xor eax, eax
push ebx
push esi
push edi
mov edi, ecx
mov dword [esp + 0x40], eax
mov dword [esp + 0x44], eax
xor ebx, ebx
mov dword [esp + 0x28], eax
mov esi, 2
mov dword [esp + 0x34], eax
mov dword [esp + 0x30], eax
mov dword [esp + 0x4c], eax
mov dword [esp + 0x3c], eax
mov eax, 0x800
or word [edi + 0x426], ax
mov eax, dword [edi]
mov dword [esp + 0x58], edi
mov dword [esp + 0x1c], esi
mov ecx, dword [eax + 0x44]
test ecx, ecx
je 0x498526
mov eax, dword [edi + 0x278]
test eax, eax
je 0x497aa6
cmp dword [eax], ebx
jne 0x498526
lea eax, [esp + 0x44]
push eax
lea eax, [esp + 0x44]
push eax
push edi
call ecx
add esp, 0xc
mov dword [esp + 0x28], eax
cmp eax, 1
jne 0x498526
mov esi, dword [edi]
mov eax, dword [esp + 0x40]
mov dword [esp + 0x2c], eax
mov dword [esp + 0x5c], esi
test esi, esi
je 0x497ff3
test eax, eax
je 0x497ff3
cmp dword [eax + 0x90], ebx
je 0x497ff3
lea ecx, [esi + 0x34]
call fcn.004b5150
mov edx, dword [esp + 0x2c]
lea ecx, [esi + 0x34]
push dword [esi + 0x78]
push 0
mov edx, dword [edx + 0x90]
mov edx, dword [edx + 8]
call fcn.004b1be0
add esp, 8
test eax, eax
jne 0x497ff3
mov eax, dword [esp + 0x2c]
mov eax, dword [eax + 0x90]
push dword [eax + 8]
push dword [eax]
mov eax, dword [esi + 0x34]
push dword [eax]
call fcn.0041d170
mov eax, dword [esi + 0x6c]
add esp, 0xc
test eax, eax
je 0x497b4b
cmp dword [esi + 0x70], ebx
je 0x497b4b
push eax
call fcn.004718d0
add esp, 4
mov eax, dword [esp + 0x2c]
mov dword [esi + 0x6c], eax
lea esi, [eax + 0x230]
mov eax, dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
push esi
call eax
mov eax, dword [esp + 0x2c]
push esi
inc dword [eax + 0x248]
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov ecx, dword [esp + 0x5c]
mov eax, dword [esp + 0x2c]
mov dword [ecx + 0x70], 1
mov edx, dword [eax + 0x84]
sub edx, 0x206
je 0x497b9e
sub edx, 0x7f
je 0x497b98
sub edx, 9
jne 0x497bae
or byte [ecx + 0x7e], 1
jmp 0x497bae
or byte [ecx + 0x7e], 2
mov eax, dword [eax + 0x8c]
mov dword [ecx + 0xfc], eax
mov ecx, dword [edi]
mov esi, dword [esp + 0x44]
mov dword [esp + 0x10], esi
mov dword [esp + 0x14], ecx
test ecx, ecx
je 0x497ff3
test esi, esi
je 0x497ff3
mov eax, dword [esi + 4]
sub eax, 0x10
je 0x497d8f
sub eax, 1
je 0x497fad
sub eax, 1
jne 0x497ff3
mov edx, dword [esi + 0x38]
mov dword [esp + 0x5c], edx
mov dword [esp + 0x24], ebx
test edx, edx
je 0x497ff3
mov eax, dword [edx + 0xc]
mov dword [esp + 0x2c], eax
test eax, eax
je 0x497ff3
mov ecx, dword [eax]
cmp ecx, 2
je 0x497c7c
cmp ecx, 3
je 0x497c7c
cmp ecx, 1
jne 0x497ff3
mov ecx, eax
call fcn.004b1ad0
mov dword [esp + 0x24], eax
test eax, eax
jle 0x497ff3
mov ecx, dword [esi + 0x2c]
mov edx, eax
call fcn.00472820
mov dword [esp + 0x5c], eax
test eax, eax
je 0x497ff3
mov edx, dword [esp + 0x2c]
sub esp, 8
mov ecx, eax
mov dword [esi + 0x2c], eax
push dword [esp + 0x2c]
call fcn.004a76f0
add esp, 0xc
mov dword [esp + 0x24], eax
test eax, eax
jns 0x497fa6
mov ecx, dword [esp + 0x5c]
call fcn.00472860
jmp 0x497ff3
cmp word [edx + 0x16], bx
je 0x497d09
push ecx
lea ecx, [esp + 0x28]
xor edx, edx
push ecx
mov ecx, eax
call fcn.004a6fb0
add esp, 8
cmp eax, 0xffffff36
jne 0x497ff3
mov ecx, dword [esp + 0x24]
call fcn.00472840
mov dword [esp + 0x48], eax
test eax, eax
je 0x497ff3
push ecx
lea ecx, [esp + 0x28]
mov edx, eax
push ecx
mov ecx, dword [esp + 0x34]
call fcn.004a6fb0
add esp, 8
test eax, eax
js 0x497cfb
mov ecx, dword [esi + 0x2c]
test ecx, ecx
je 0x497cdc
call fcn.00472860
mov eax, dword [esp + 0x24]
mov ecx, dword [esp + 0x48]
mov dword [esi + 0xc], eax
mov eax, dword [esp + 0x5c]
mov dword [esi + 0x2c], ecx
mov ax, word [eax + 0x16]
mov word [esi + 0x74], ax
jmp 0x497fa9
mov ecx, dword [esp + 0x48]
call fcn.00472860
jmp 0x497ff3
cmp ecx, 3
jne 0x497d29
push 0
push ecx
xor edx, edx
mov ecx, eax
call fcn.004a0120
add esp, 8
test eax, eax
jne 0x497ff3
mov eax, dword [esp + 0x2c]
mov ecx, eax
call fcn.004b2040
mov dword [esp + 0x24], eax
test eax, eax
jle 0x497ff3
mov ecx, eax
call fcn.00472840
mov ecx, eax
mov dword [esp + 0x48], ecx
test ecx, ecx
je 0x497ff3
mov eax, dword [esp + 0x24]
mov edx, ecx
push 1
mov dword [esp + 0x54], eax
lea eax, [esp + 0x54]
push ecx
mov ecx, dword [esp + 0x34]
push eax
call fcn.004a7330
add esp, 0xc
test eax, eax
js 0x497cfb
mov ecx, dword [esi + 0x2c]
test ecx, ecx
je 0x497d7f
call fcn.00472860
mov ecx, dword [esp + 0x48]
mov eax, dword [esp + 0x24]
mov dword [esi + 0x2c], ecx
jmp 0x497fa6
mov eax, dword [esi + 0x30]
mov dword [esp + 0x38], ebx
mov dword [esp + 0x48], eax
test eax, eax
je 0x497ff3
mov eax, dword [eax + 0x24]
mov dword [esp + 0x54], eax
test eax, eax
je 0x497ff3
cmp dword [eax + 0x2088], 1
jne 0x497e01
push 0
xor edx, edx
mov ecx, eax
call fcn.004b32f0
add esp, 4
mov dword [esp + 0x20], eax
test eax, eax
jle 0x497ff3
mov ecx, dword [esp + 0x48]
mov esi, eax
movzx ecx, word [ecx + 0x48]
test cx, cx
mov edx, ecx
lea ecx, [eax + 0x28]
cmovne esi, ebx
test dx, dx
cmove ecx, ebx
mov dword [esp + 0x38], ecx
test esi, esi
js 0x497ff3
mov esi, dword [esp + 0x10]
jmp 0x497e1c
push ecx
push 0
mov edx, eax
xor ecx, ecx
call fcn.004a7870
add esp, 8
mov dword [esp + 0x20], eax
test eax, eax
jle 0x497ff3
mov ecx, dword [esi + 0x2c]
mov edx, eax
call fcn.00472820
mov edx, eax
mov dword [esp + 0x18], edx
test edx, edx
je 0x497ff3
mov ecx, dword [esp + 0x54]
mov eax, dword [esp + 0x20]
mov dword [esi + 0x2c], edx
cmp dword [ecx + 0x2088], 1
jne 0x497f8a
push eax
call fcn.004b32f0
add esp, 4
mov dword [esp + 0x24], eax
test eax, eax
jle 0x497fa0
mov ecx, dword [esp + 0x48]
cmp word [ecx + 0x48], bx
je 0x497fa6
mov ecx, dword [esp + 0x38]
mov dword [esp + 0x20], ecx
call fcn.00472840
mov dword [esp + 0x2c], eax
test eax, eax
je 0x497ff3
mov eax, dword [esp + 0x24]
mov dword [esp + 0x50], ebx
mov dword [esp + 0x60], ebx
lea ecx, [eax + 0x28]
cmp dword [esp + 0x38], ecx
jae 0x497eaa
mov dword [esp + 0x24], 0xffffff7c
jmp 0x497f74
lea ecx, [esp + 0x60]
push ecx
mov ecx, dword [esp + 0x1c]
lea edx, [esp + 0x54]
push eax
call fcn.004b1140
add esp, 8
test eax, eax
js 0x497ed1
mov dword [esp + 0x24], 0xffffff74
jmp 0x497f74
mov edi, dword [esp + 0x2c]
lea eax, [edi + 5]
test eax, eax
jne 0x497ee8
mov ebx, 0xffffff53
mov esi, 0xffffff58
jmp 0x497efa
mov word [eax], 0x102
mov esi, 8
mov byte [eax + 2], bl
mov ebx, 3
push 0
push 2
lea edx, [esi + edi]
mov ecx, 0x285
call fcn.004b0ac0
mov ecx, dword [esp + 0x2c]
add esi, eax
add ebx, eax
lea edx, [edi + esi]
call fcn.004abe00
mov edi, eax
lea ecx, [edi + esi]
mov esi, dword [esp + 0x2c]
push esi
push dword [esp + 0x24]
mov dword [esp + 0x60], ecx
add ecx, dword [esp + 0x3c]
push ecx
call fcn.0041d170
lea eax, [edi + esi]
add esp, 0x14
mov edi, dword [esp + 0x2c]
add ebx, eax
mov edx, edi
mov ecx, ebx
call fcn.004b1b60
mov esi, eax
lea eax, [edi + 5]
push ebx
push eax
lea edx, [esi + edi]
push edx
call fcn.0041d170
mov edi, dword [esp + 0x64]
lea eax, [esi + ebx]
mov esi, dword [esp + 0x1c]
add esp, 0xc
mov dword [esp + 0x20], eax
xor ebx, ebx
mov dword [esp + 0x24], eax
mov ecx, dword [esp + 0x18]
call fcn.00472860
mov eax, dword [esp + 0x2c]
mov dword [esi + 0x2c], eax
mov eax, dword [esp + 0x24]
jmp 0x497f9e
push ecx
mov edx, ecx
mov ecx, dword [esp + 0x1c]
push eax
call fcn.004a7870
add esp, 8
test eax, eax
jg 0x497fa6
test eax, eax
js 0x497ff3
mov eax, dword [esp + 0x20]
mov dword [esi + 0xc], eax
mov ecx, dword [esp + 0x14]
mov edx, dword [esi + 0x2c]
test edx, edx
je 0x497ff3
mov al, byte [ecx + 0x7d]
not al
shr eax, 1
and eax, 1
push eax
push 0
push 0
push 0
push 1
push 2
push dword [esi + 0xc]
call fcn.0046a3e0
add esp, 0x1c
cmp eax, 1
jne 0x497ff3
mov ax, word [edi + 0x420]
mov ecx, 0xfffb
and ax, cx
or ax, 2
mov word [edi + 0x420], ax
mov esi, dword [esp + 0x40]
mov dword [esp + 0x54], esi
test esi, esi
je 0x498360
cmp byte [esi + 0x98], 0
je 0x498360
lea eax, [esi + 0x230]
push eax
mov dword [esp + 0x60], eax
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
dec dword [esi + 0x248]
push dword [esp + 0x5c]
mov esi, dword [esi + 0x248]
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
test esi, esi
jne 0x498360
mov esi, dword [esp + 0x54]
lea ecx, [esi + 0x418]
call fcn.0048f2a0
lea ecx, [esi + 0x904]
call fcn.0048f2a0
mov eax, dword [esi + 0x7c]
test eax, eax
je 0x49807e
mov ecx, dword [0x55587c]
push eax
test ecx, ecx
je 0x49806f
call ecx
jmp 0x498074
call fcn.0042a4fb
add esp, 4
mov dword [esi + 0x7c], 0
lea eax, [esi + 0x90]
test eax, eax
je 0x4980d9
mov edx, dword [eax]
test edx, edx
je 0x4980d9
cmp dword [edx + 0xc], 1
jne 0x4980ac
mov eax, dword [edx]
test eax, eax
je 0x4980ac
mov ecx, dword [edx + 8]
test ecx, ecx
je 0x4980ac
mov byte [eax], 0
lea eax, [eax + 1]
sub ecx, 1
jne 0x4980a1
mov eax, dword [0x55587c]
mov dword [edx], 0
mov dword [edx + 8], 0
push edx
test eax, eax
je 0x4980c7
call eax
jmp 0x4980cc
call fcn.0042a4fb
add esp, 4
mov dword [esi + 0x90], 0
mov eax, dword [esi + 0x6c]
test eax, eax
je 0x4980f7
mov ecx, dword [0x55587c]
push eax
test ecx, ecx
je 0x4980ef
call ecx
jmp 0x4980f4
call fcn.0042a4fb
add esp, 4
mov eax, dword [esi + 0x250]
mov dword [esi + 0x6c], 0
test eax, eax
je 0x498117
mov ecx, dword [0x55587c]
push eax
test ecx, ecx
je 0x498135
call ecx
jmp 0x49813a
mov ecx, dword [esi + 0x24c]
lea eax, [esi + 0x24c]
test ecx, ecx
je 0x498143
mov eax, dword [0x55587c]
push ecx
test eax, eax
je 0x498135
call eax
jmp 0x49813a
call fcn.0042a4fb
add esp, 4
lea eax, [esi + 0x24c]
mov dword [eax], 0
mov eax, dword [esi + 0x254]
mov dword [esi + 0x250], 0
test eax, eax
je 0x498174
mov ecx, dword [0x55587c]
push eax
test ecx, ecx
je 0x49816c
call ecx
jmp 0x498171
call fcn.0042a4fb
add esp, 4
mov eax, dword [esi + 0x268]
mov dword [esi + 0x254], 0
test eax, eax
je 0x4981a9
mov ecx, dword [0x55587c]
push eax
test ecx, ecx
je 0x498197
call ecx
jmp 0x49819c
call fcn.0042a4fb
add esp, 4
mov dword [esi + 0x268], 0
mov eax, dword [esi + 0x260]
test eax, eax
je 0x4981d4
mov ecx, dword [0x55587c]
push eax
test ecx, ecx
je 0x4981c2
call ecx
jmp 0x4981c7
call fcn.0042a4fb
add esp, 4
mov dword [esi + 0x260], 0
mov eax, dword [esi + 0x264]
test eax, eax
je 0x4981ff
mov ecx, dword [0x55587c]
push eax
test ecx, ecx
je 0x4981ed
call ecx
jmp 0x4981f2
call fcn.0042a4fb
add esp, 4
mov dword [esi + 0x264], 0
mov eax, dword [esi + 0x26c]
test eax, eax
je 0x498220
mov ecx, dword [0x55587c]
push eax
test ecx, ecx
je 0x498218
call ecx
jmp 0x49821d
call fcn.0042a4fb
add esp, 4
mov ecx, dword [esi + 0xc]
test ecx, ecx
je 0x49822e
xor edx, edx
call fcn.00466ac0
mov ecx, dword [esi + 0x10]
test ecx, ecx
je 0x49823c
xor edx, edx
call fcn.00466ac0
mov eax, dword [esi + 0x18]
mov dword [esp + 0x48], eax
test eax, eax
je 0x498285
test byte [eax + 0x20], 1
je 0x49826e
mov ecx, dword [eax + 0x18]
test ecx, ecx
je 0x49826e
mov eax, dword [0x55587c]
push ecx
test eax, eax
je 0x498262
call eax
jmp 0x498267
call fcn.0042a4fb
mov eax, dword [esp + 0x4c]
add esp, 4
mov ecx, dword [0x55587c]
push eax
test ecx, ecx
je 0x49827d
call ecx
jmp 0x498282
call fcn.0042a4fb
add esp, 4
mov eax, dword [esi + 0x258]
test eax, eax
je 0x4982b0
mov ecx, dword [0x55587c]
push eax
test ecx, ecx
je 0x49829e
call ecx
jmp 0x4982a3
call fcn.0042a4fb
add esp, 4
mov dword [esi + 0x258], 0
mov eax, dword [esi + 0xdf0]
test eax, eax
je 0x4982cd
push eax
call fcn.004678a0
add esp, 4
mov dword [esi + 0xdf0], 0
mov ecx, dword [esi + 0xdf8]
test ecx, ecx
je 0x4982e6
call fcn.00463bf0
mov dword [esi + 0xdf8], 0
mov ecx, dword [esi + 0xdfc]
test ecx, ecx
je 0x4982ff
call fcn.0046e570
mov dword [esi + 0xdfc], 0
mov eax, dword [esi + 0x25c]
test eax, eax
je 0x49832a
mov ecx, dword [0x55587c]
push eax
test ecx, ecx
je 0x498318
call ecx
jmp 0x49831d
call fcn.0042a4fb
add esp, 4
mov dword [esi + 0x25c], 0
mov ecx, dword [esi + 0x78]
test ecx, ecx
je 0x49833d
call fcn.004b0190
mov dword [esi + 0x78], 0
lea eax, [esi + 0x230]
push eax
call dword [sym.imp.KERNEL32.dll_DeleteCriticalSection]
mov eax, dword [0x55587c]
push esi
test eax, eax
je 0x498358
call eax
jmp 0x49835d
call fcn.0042a4fb
add esp, 4
mov esi, dword [esp + 0x44]
mov dword [esp + 0x54], esi
test esi, esi
je 0x498521
lea eax, [esi + 0x14]
mov dword [esp + 0x5c], eax
push eax
mov eax, dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
call eax
dec dword [esi + 0x10]
push dword [esp + 0x5c]
mov esi, dword [esi + 0x10]
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
test esi, esi
jne 0x498521
mov esi, dword [esp + 0x54]
lea eax, [esi + 0x40]
test eax, eax
je 0x4983dc
mov ecx, dword [eax + 8]
test ecx, ecx
je 0x4983d8
call fcn.004cf050
mov ecx, dword [esi + 0x48]
lea eax, [esi + 0x40]
test ecx, ecx
je 0x4983d1
mov eax, dword [0x55587c]
push ecx
test eax, eax
je 0x4983c6
call eax
jmp 0x4983cb
call fcn.0042a4fb
lea eax, [esi + 0x40]
add esp, 4
mov dword [eax + 8], 0
mov byte [eax + 0xc], 0
mov eax, dword [esi + 0x2c]
test eax, eax
je 0x498401
mov ecx, dword [0x55587c]
push eax
test ecx, ecx
je 0x4983f2
call ecx
jmp 0x4983f7
call fcn.0042a4fb
add esp, 4
mov dword [esi + 0x2c], 0
mov eax, dword [esi + 4]
cmp eax, 0x12
jg 0x49848c
je 0x498469
sub eax, 0x10
je 0x498443
sub eax, 1
jne 0x498501
mov ecx, dword [esi + 0x34]
test ecx, ecx
je 0x498501
test byte [esi + 0x76], 4
je 0x498501
call fcn.0046d700
mov dword [esi + 0x34], 0
jmp 0x498501
mov ecx, dword [esi + 0x30]
test ecx, ecx
je 0x498501
test byte [esi + 0x76], 8
je 0x498501
call fcn.0046e0f0
mov dword [esi + 0x30], 0
jmp 0x498501
mov ecx, dword [esi + 0x38]
test ecx, ecx
je 0x498501
test byte [esi + 0x76], 2
je 0x498501
call fcn.0046c860
mov dword [esi + 0x38], 0
jmp 0x498501
cmp eax, 0x1c
je 0x4984e8
cmp eax, 0x40c
jne 0x498501
mov ecx, dword [esi + 0x54]
test ecx, ecx
je 0x4984ab
call fcn.00472860
mov dword [esi + 0x54], 0
mov ecx, dword [esi + 0x5c]
test ecx, ecx
je 0x4984be
call fcn.00472860
mov dword [esi + 0x5c], 0
mov ecx, dword [esi + 0x64]
test ecx, ecx
je 0x4984d1
call fcn.00472860
mov dword [esi + 0x64], 0
mov dword [esi + 0x58], 0
mov dword [esi + 0x60], 0
mov dword [esi + 0x68], 0
jmp 0x498501
mov ecx, dword [esi + 0x3c]
test ecx, ecx
je 0x498501
test byte [esi + 0x76], 1
je 0x498501
call fcn.0046d360
mov dword [esi + 0x3c], 0
lea eax, [esi + 0x14]
push eax
call dword [sym.imp.KERNEL32.dll_DeleteCriticalSection]
mov eax, dword [0x55587c]
push esi
test eax, eax
je 0x498519
call eax
jmp 0x49851e
call fcn.0042a4fb
add esp, 4
mov esi, 2
mov al, byte [edi + 0x420]
and al, 6
cmp al, 4
jne 0x498556
xor ecx, ecx
mov dword [esp + 0x48], 4
mov edx, 4
mov dword [esp + 0x20], ecx
mov dword [esp + 0x38], ecx
mov dword [esp + 0x18], edx
mov dword [esp + 0x2c], ecx
jmp 0x498671
mov ecx, edi
call fcn.00467da0
test eax, eax
jne 0x498aeb
mov eax, dword [edi + 0x278]
test eax, eax
jne 0x49857b
mov eax, 0xfffffeb8
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov eax, dword [eax + 8]
mov dl, 0xb
mov dword [esp + 0x20], eax
mov ecx, edi
lea eax, [esp + 0x30]
mov dword [esp + 0x48], 7
push eax
call fcn.004733f0
add esp, 4
mov dword [esp + 0x28], eax
test eax, eax
js 0x498aeb
mov ecx, dword [esp + 0x30]
mov dword [esp + 0x34], ecx
cmp cx, 2
jbe 0x498614
cmp dword [edi + 0x294], 0
jne 0x498614
push dword [edi + 0x84]
movzx edx, cx
lea ecx, [edi + 0x294]
push 0
call fcn.004b1be0
add esp, 8
test eax, eax
js 0x498aeb
mov edx, dword [edi + 0x294]
lea eax, [esp + 0x30]
push eax
push 0xb
mov ecx, edi
mov dword [esp + 0x38], 0
mov edx, dword [edx]
call fcn.004731c0
add esp, 8
mov dword [esp + 0x28], eax
test eax, eax
js 0x498aeb
mov ecx, dword [esp + 0x30]
mov dword [esp + 0x34], ecx
movzx eax, cx
mov ecx, dword [esp + 0x20]
lea edx, [ecx + 7]
add edx, eax
add eax, 3
add eax, ecx
mov dword [esp + 0x18], edx
mov dword [esp + 0x2c], eax
test ecx, ecx
je 0x498669
mov ecx, dword [edi + 0x290]
test ecx, ecx
jle 0x498665
mov eax, dword [edi + 0x28c]
mov esi, dword [eax]
mov eax, dword [eax + 8]
mov dword [esp + 0x3c], esi
mov esi, dword [esp + 0x1c]
lea eax, [eax + ecx*2]
mov ecx, dword [esp + 0x20]
add edx, eax
mov dword [esp + 0x38], eax
add dword [esp + 0x2c], eax
mov dword [esp + 0x18], edx
jmp 0x498671
mov ecx, dword [esp + 0x20]
mov dword [esp + 0x38], 0
mov eax, dword [edi + 0x2d0]
mov dword [esp + 0x64], edx
test eax, eax
je 0x49868d
add eax, dword [esp + 0x48]
mov esi, dword [esp + 0x1c]
sub edx, eax
mov dword [esp + 0x18], edx
mov eax, dword [esp + 0x28]
test edx, edx
je 0x498abe
nop dword [eax]
test eax, eax
jne 0x498abe
mov dword [esp + 0x14], 5
cmp dword [edi + 0x2d0], eax
jne 0x4986e0
mov eax, dword [esp + 0x34]
movzx eax, ax
add eax, dword [esp + 0x48]
add eax, dword [esp + 0x38]
add eax, ecx
mov dword [esp + 0x14], 9
mov ecx, 0x3ffc
cmp eax, ecx
cmovbe ecx, eax
lea eax, [ecx + 0x6f]
jmp 0x4986ed
mov ecx, 0x4000
cmp edx, ecx
cmovb ecx, edx
lea eax, [ecx + 0x6b]
mov dword [esp + 0xc], ecx
mov edx, eax
mov ecx, edi
mov dword [esp + 0x5c], eax
call fcn.004893c0
mov dword [esp + 0x28], eax
test eax, eax
jne 0x498aeb
mov edx, dword [edi + 0x214]
add edx, dword [edi + 0x218]
mov ecx, dword [edi + 0x2d0]
mov dword [esp + 0x10], edx
mov byte [edx], 0x16
mov al, byte [edi + 0x2e0]
mov byte [edx + 1], al
mov byte [edx + 2], 3
test ecx, ecx
jne 0x4987f6
mov esi, dword [esp + 0x10]
mov ecx, dword [esp + 0xc]
mov edx, dword [esp + 0x64]
add ecx, 4
mov eax, ecx
sub dword [esp + 0x18], 4
shr eax, 8
mov byte [esi + 3], al
mov eax, esi
mov byte [eax + 4], cl
mov ecx, esi
mov eax, edx
shr eax, 0x10
mov byte [ecx + 6], al
mov eax, edx
shr eax, 8
mov byte [ecx + 7], al
mov eax, esi
mov byte [ecx + 8], dl
mov edx, dword [esp + 0x2c]
mov byte [ecx + 5], 0xb
mov ecx, dword [esp + 0x14]
mov byte [ecx + eax], 0
mov eax, dword [esp + 0x2c]
shr eax, 0x10
mov byte [ecx + esi + 1], al
mov eax, dword [esp + 0x2c]
shr eax, 8
mov byte [ecx + esi + 2], al
mov eax, esi
mov esi, dword [esp + 0x1c]
mov byte [ecx + eax + 3], dl
add ecx, 4
mov edx, dword [esp + 0xc]
mov eax, dword [esp + 0x20]
sub edx, 4
mov dword [esp + 0x14], ecx
mov dword [esp + 0xc], edx
test eax, eax
je 0x4988ec
mov esi, dword [esp + 0x10]
mov edx, dword [esp + 0x20]
sub dword [esp + 0x18], 3
shr eax, 0x10
mov byte [ecx + esi], al
mov eax, dword [esp + 0x20]
shr eax, 8
mov byte [ecx + esi + 1], al
mov eax, esi
mov byte [ecx + eax + 2], dl
add ecx, 3
mov edx, dword [esp + 0xc]
sub edx, 3
mov dword [esp + 0x14], ecx
mov dword [esp + 0xc], edx
jmp 0x498819
mov ecx, dword [esp + 0x10]
mov edx, dword [esp + 0xc]
mov eax, edx
shr eax, 8
mov byte [ecx + 3], al
mov eax, dword [esp + 0x20]
mov byte [ecx + 4], dl
mov ecx, dword [esp + 0x14]
test eax, eax
je 0x4988ec
mov eax, dword [esp + 0x34]
mov esi, dword [esp + 0x1c]
movzx eax, ax
add eax, dword [esp + 0x20]
mov dword [esp + 0x54], eax
cmp dword [edi + 0x2d0], eax
jae 0x4988ec
mov eax, dword [esp + 0x10]
add eax, ecx
mov ecx, edi
push eax
push edx
push dword [edi + 0x2d0]
mov edx, dword [edi + 0x278]
push dword [esp + 0x40]
push dword [esp + 0x30]
mov edx, dword [edx]
call fcn.00498b10
mov edx, dword [esp + 0x20]
add esp, 0x14
add dword [esp + 0x14], eax
sub edx, eax
add dword [edi + 0x2d0], eax
sub dword [esp + 0x18], eax
mov eax, dword [esp + 0x54]
mov dword [esp + 0xc], edx
cmp dword [edi + 0x2d0], eax
jne 0x4988f0
lea eax, [edi + 0x294]
test eax, eax
je 0x4988f0
mov ecx, dword [eax]
mov dword [esp + 0x54], ecx
test ecx, ecx
je 0x4988f0
cmp dword [ecx + 0xc], 1
jne 0x4988bf
mov eax, dword [ecx]
test eax, eax
je 0x4988bf
mov ecx, dword [ecx + 8]
test ecx, ecx
je 0x4988bb
nop dword [eax + eax]
mov byte [eax], 0
lea eax, [eax + 1]
sub ecx, 1
jne 0x4988b0
mov ecx, dword [esp + 0x54]
mov eax, dword [0x55587c]
mov dword [ecx], 0
mov dword [ecx + 8], 0
push ecx
test eax, eax
je 0x4988da
call eax
jmp 0x4988df
call fcn.0042a4fb
add esp, 4
mov dword [edi + 0x294], 0
mov edx, dword [esp + 0xc]
cmp dword [esp + 0x38], 0
jbe 0x4989d6
test edx, edx
je 0x4989d6
lea eax, [ebx + 2]
cmp esi, eax
jne 0x498953
mov ecx, dword [edi + 0x28c]
xor esi, esi
mov ebx, dword [esp + 0x4c]
mov dword [esp + 0x1c], esi
mov eax, dword [ecx]
add eax, ebx
mov dword [esp + 0x3c], eax
cmp ebx, dword [ecx + 8]
je 0x4989d4
movzx ebx, byte [eax]
movzx eax, byte [eax + 1]
shl ebx, 8
or ebx, eax
mov eax, dword [esp + 0x3c]
shl ebx, 8
movzx eax, byte [eax + 2]
or ebx, eax
add ebx, 3
add dword [esp + 0x4c], ebx
test ebx, ebx
je 0x4989d6
mov eax, ebx
xor ecx, ecx
sub eax, esi
mov esi, edx
cmp eax, edx
cmovb esi, eax
mov eax, dword [esp + 0x1c]
cmp eax, ebx
jae 0x498989
add eax, dword [esp + 0x3c]
push esi
push eax
mov eax, dword [esp + 0x1c]
add eax, dword [esp + 0x18]
push eax
call fcn.0041d170
mov edx, dword [esp + 0x18]
add esp, 0xc
mov ecx, esi
cmp esi, edx
je 0x4989af
mov eax, ebx
sub eax, ecx
sub eax, dword [esp + 0x1c]
add eax, 2
cmp eax, edx
ja 0x4989ad
mov eax, dword [esp + 0x14]
add eax, dword [esp + 0x10]
mov edi, dword [esp + 0x58]
mov word [ecx + eax], 0
add ecx, 2
mov esi, ecx
add dword [esp + 0x14], esi
sub edx, esi
add dword [edi + 0x2d0], esi
sub dword [esp + 0x18], esi
add dword [esp + 0x1c], esi
mov dword [esp + 0xc], edx
test edx, edx
je 0x4989d6
mov esi, dword [esp + 0x1c]
jmp 0x498903
xor ebx, ebx
mov eax, dword [esp + 0x14]
add eax, 0xfffffffb
js 0x498afb
mov esi, dword [esp + 0x10]
sub esp, 8
mov edx, esi
mov ecx, edi
push 1
push 0x16
push eax
lea eax, [esi + 5]
push eax
push dword [esp + 0x74]
call fcn.0049dcc0
mov ecx, eax
add esp, 0x1c
mov dword [esp + 0x54], ecx
test ecx, ecx
js 0x498af2
cmp byte [edi + 0x4f9], 0
je 0x498a84
mov eax, dword [edi + 0x4f0]
mov dword [esp + 0x5c], eax
test eax, eax
je 0x498a80
test ecx, ecx
jle 0x498a80
cmp byte [edi + 0x40c], 1
je 0x498a80
push dword [edi + 0x4f4]
movzx eax, byte [edi + 0x2e0]
movzx edx, byte [edi + 0x2e1]
push edi
push ecx
mov ecx, eax
and eax, 0xf
and ecx, 0xf0
shl ecx, 4
add ecx, eax
mov eax, edx
shl ecx, 4
and eax, 0xf0
add ecx, eax
and edx, 0xf
push esi
shl ecx, 4
push 0x16
add ecx, edx
push ecx
push 1
call dword [esp + 0x78]
mov ecx, dword [esp + 0x70]
add esp, 0x1c
xor eax, eax
jmp 0x498a88
mov eax, dword [esp + 0x28]
add dword [edi + 0x218], ecx
mov ecx, 0xf7ff
and word [edi + 0x426], cx
test byte [edi + 0x424], 0x80
jne 0x498aaa
mov ecx, edi
call fcn.0048ff70
mov edx, dword [esp + 0x18]
mov esi, dword [esp + 0x1c]
mov ecx, dword [esp + 0x20]
test edx, edx
jne 0x4986a0
cmp eax, 0xfffffeb9
je 0x498aeb
mov ecx, 0xf7ff
mov dword [edi + 0x2d0], 0
and word [edi + 0x426], cx
test byte [edi + 0x420], 0x60
jne 0x498aeb
mov byte [edi + 0x42b], 5
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov eax, ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
pop edi
pop esi
mov eax, 0xffffff7c
pop ebx
mov esp, ebp
pop ebp
ret