Function at 0x497d20
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 0x498806
mov eax, dword [edi + 0x278]
test eax, eax
je 0x497d86
cmp dword [eax], ebx
jne 0x498806
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 0x498806
mov esi, dword [edi]
mov eax, dword [esp + 0x40]
mov dword [esp + 0x2c], eax
mov dword [esp + 0x5c], esi
test esi, esi
je 0x4982d3
test eax, eax
je 0x4982d3
cmp dword [eax + 0x90], ebx
je 0x4982d3
lea ecx, [esi + 0x34]
call fcn.004b53c0
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.004b1e50
add esp, 8
test eax, eax
jne 0x4982d3
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.0041d1d0
mov eax, dword [esi + 0x6c]
add esp, 0xc
test eax, eax
je 0x497e2b
cmp dword [esi + 0x70], ebx
je 0x497e2b
push eax
call fcn.00471b20
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 0x497e7e
sub edx, 0x7f
je 0x497e78
sub edx, 9
jne 0x497e8e
or byte [ecx + 0x7e], 1
jmp 0x497e8e
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 0x4982d3
test esi, esi
je 0x4982d3
mov eax, dword [esi + 4]
sub eax, 0x10
je 0x49806f
sub eax, 1
je 0x49828d
sub eax, 1
jne 0x4982d3
mov edx, dword [esi + 0x38]
mov dword [esp + 0x5c], edx
mov dword [esp + 0x24], ebx
test edx, edx
je 0x4982d3
mov eax, dword [edx + 0xc]
mov dword [esp + 0x2c], eax
test eax, eax
je 0x4982d3
mov ecx, dword [eax]
cmp ecx, 2
je 0x497f5c
cmp ecx, 3
je 0x497f5c
cmp ecx, 1
jne 0x4982d3
mov ecx, eax
call fcn.004b1d40
mov dword [esp + 0x24], eax
test eax, eax
jle 0x4982d3
mov ecx, dword [esi + 0x2c]
mov edx, eax
call fcn.00472ad0
mov dword [esp + 0x5c], eax
test eax, eax
je 0x4982d3
mov edx, dword [esp + 0x2c]
sub esp, 8
mov ecx, eax
mov dword [esi + 0x2c], eax
push dword [esp + 0x2c]
call fcn.004a79e0
add esp, 0xc
mov dword [esp + 0x24], eax
test eax, eax
jns 0x498286
mov ecx, dword [esp + 0x5c]
call fcn.00472b30
jmp 0x4982d3
cmp word [edx + 0x16], bx
je 0x497fe9
push ecx
lea ecx, [esp + 0x28]
xor edx, edx
push ecx
mov ecx, eax
call fcn.004a72a0
add esp, 8
cmp eax, 0xffffff36
jne 0x4982d3
mov ecx, dword [esp + 0x24]
call fcn.00472af0
mov dword [esp + 0x48], eax
test eax, eax
je 0x4982d3
push ecx
lea ecx, [esp + 0x28]
mov edx, eax
push ecx
mov ecx, dword [esp + 0x34]
call fcn.004a72a0
add esp, 8
test eax, eax
js 0x497fdb
mov ecx, dword [esi + 0x2c]
test ecx, ecx
je 0x497fbc
call fcn.00472b30
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 0x498289
mov ecx, dword [esp + 0x48]
call fcn.00472b30
jmp 0x4982d3
cmp ecx, 3
jne 0x498009
push 0
push ecx
xor edx, edx
mov ecx, eax
call fcn.004a0400
add esp, 8
test eax, eax
jne 0x4982d3
mov eax, dword [esp + 0x2c]
mov ecx, eax
call fcn.004b22b0
mov dword [esp + 0x24], eax
test eax, eax
jle 0x4982d3
mov ecx, eax
call fcn.00472af0
mov ecx, eax
mov dword [esp + 0x48], ecx
test ecx, ecx
je 0x4982d3
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.004a7620
add esp, 0xc
test eax, eax
js 0x497fdb
mov ecx, dword [esi + 0x2c]
test ecx, ecx
je 0x49805f
call fcn.00472b30
mov ecx, dword [esp + 0x48]
mov eax, dword [esp + 0x24]
mov dword [esi + 0x2c], ecx
jmp 0x498286
mov eax, dword [esi + 0x30]
mov dword [esp + 0x38], ebx
mov dword [esp + 0x48], eax
test eax, eax
je 0x4982d3
mov eax, dword [eax + 0x24]
mov dword [esp + 0x54], eax
test eax, eax
je 0x4982d3
cmp dword [eax + 0x2088], 1
jne 0x4980e1
push 0
xor edx, edx
mov ecx, eax
call fcn.004b3560
add esp, 4
mov dword [esp + 0x20], eax
test eax, eax
jle 0x4982d3
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 0x4982d3
mov esi, dword [esp + 0x10]
jmp 0x4980fc
push ecx
push 0
mov edx, eax
xor ecx, ecx
call fcn.004a7b60
add esp, 8
mov dword [esp + 0x20], eax
test eax, eax
jle 0x4982d3
mov ecx, dword [esi + 0x2c]
mov edx, eax
call fcn.00472ad0
mov edx, eax
mov dword [esp + 0x18], edx
test edx, edx
je 0x4982d3
mov ecx, dword [esp + 0x54]
mov eax, dword [esp + 0x20]
mov dword [esi + 0x2c], edx
cmp dword [ecx + 0x2088], 1
jne 0x49826a
push eax
call fcn.004b3560
add esp, 4
mov dword [esp + 0x24], eax
test eax, eax
jle 0x498280
mov ecx, dword [esp + 0x48]
cmp word [ecx + 0x48], bx
je 0x498286
mov ecx, dword [esp + 0x38]
mov dword [esp + 0x20], ecx
call fcn.00472af0
mov dword [esp + 0x2c], eax
test eax, eax
je 0x4982d3
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 0x49818a
mov dword [esp + 0x24], 0xffffff7c
jmp 0x498254
lea ecx, [esp + 0x60]
push ecx
mov ecx, dword [esp + 0x1c]
lea edx, [esp + 0x54]
push eax
call fcn.004b13b0
add esp, 8
test eax, eax
js 0x4981b1
mov dword [esp + 0x24], 0xffffff74
jmp 0x498254
mov edi, dword [esp + 0x2c]
lea eax, [edi + 5]
test eax, eax
jne 0x4981c8
mov ebx, 0xffffff53
mov esi, 0xffffff58
jmp 0x4981da
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.004b0d30
mov ecx, dword [esp + 0x2c]
add esi, eax
add ebx, eax
lea edx, [edi + esi]
call fcn.004ac060
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.0041d1d0
lea eax, [edi + esi]
add esp, 0x14
mov edi, dword [esp + 0x2c]
add ebx, eax
mov edx, edi
mov ecx, ebx
call fcn.004b1dd0
mov esi, eax
lea eax, [edi + 5]
push ebx
push eax
lea edx, [esi + edi]
push edx
call fcn.0041d1d0
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.00472b30
mov eax, dword [esp + 0x2c]
mov dword [esi + 0x2c], eax
mov eax, dword [esp + 0x24]
jmp 0x49827e
push ecx
mov edx, ecx
mov ecx, dword [esp + 0x1c]
push eax
call fcn.004a7b60
add esp, 8
test eax, eax
jg 0x498286
test eax, eax
js 0x4982d3
mov eax, dword [esp + 0x20]
mov dword [esi + 0xc], eax
mov ecx, dword [esp + 0x14]
mov edx, dword [esi + 0x2c]
test edx, edx
je 0x4982d3
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.0046a630
add esp, 0x1c
cmp eax, 1
jne 0x4982d3
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 0x498640
cmp byte [esi + 0x98], 0
je 0x498640
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 0x498640
mov esi, dword [esp + 0x54]
lea ecx, [esi + 0x418]
call fcn.0048f580
lea ecx, [esi + 0x904]
call fcn.0048f580
mov eax, dword [esi + 0x7c]
test eax, eax
je 0x49835e
mov ecx, dword [0x420ede8]
push eax
test ecx, ecx
je 0x49834f
call ecx
jmp 0x498354
call fcn.0042a55b
add esp, 4
mov dword [esi + 0x7c], 0
lea eax, [esi + 0x90]
test eax, eax
je 0x4983b9
mov edx, dword [eax]
test edx, edx
je 0x4983b9
cmp dword [edx + 0xc], 1
jne 0x49838c
mov eax, dword [edx]
test eax, eax
je 0x49838c
mov ecx, dword [edx + 8]
test ecx, ecx
je 0x49838c
mov byte [eax], 0
lea eax, [eax + 1]
sub ecx, 1
jne 0x498381
mov eax, dword [0x420ede8]
mov dword [edx], 0
mov dword [edx + 8], 0
push edx
test eax, eax
je 0x4983a7
call eax
jmp 0x4983ac
call fcn.0042a55b
add esp, 4
mov dword [esi + 0x90], 0
mov eax, dword [esi + 0x6c]
test eax, eax
je 0x4983d7
mov ecx, dword [0x420ede8]
push eax
test ecx, ecx
je 0x4983cf
call ecx
jmp 0x4983d4
call fcn.0042a55b
add esp, 4
mov eax, dword [esi + 0x250]
mov dword [esi + 0x6c], 0
test eax, eax
je 0x4983f7
mov ecx, dword [0x420ede8]
push eax
test ecx, ecx
je 0x498415
call ecx
jmp 0x49841a
mov ecx, dword [esi + 0x24c]
lea eax, [esi + 0x24c]
test ecx, ecx
je 0x498423
mov eax, dword [0x420ede8]
push ecx
test eax, eax
je 0x498415
call eax
jmp 0x49841a
call fcn.0042a55b
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 0x498454
mov ecx, dword [0x420ede8]
push eax
test ecx, ecx
je 0x49844c
call ecx
jmp 0x498451
call fcn.0042a55b
add esp, 4
mov eax, dword [esi + 0x268]
mov dword [esi + 0x254], 0
test eax, eax
je 0x498489
mov ecx, dword [0x420ede8]
push eax
test ecx, ecx
je 0x498477
call ecx
jmp 0x49847c
call fcn.0042a55b
add esp, 4
mov dword [esi + 0x268], 0
mov eax, dword [esi + 0x260]
test eax, eax
je 0x4984b4
mov ecx, dword [0x420ede8]
push eax
test ecx, ecx
je 0x4984a2
call ecx
jmp 0x4984a7
call fcn.0042a55b
add esp, 4
mov dword [esi + 0x260], 0
mov eax, dword [esi + 0x264]
test eax, eax
je 0x4984df
mov ecx, dword [0x420ede8]
push eax
test ecx, ecx
je 0x4984cd
call ecx
jmp 0x4984d2
call fcn.0042a55b
add esp, 4
mov dword [esi + 0x264], 0
mov eax, dword [esi + 0x26c]
test eax, eax
je 0x498500
mov ecx, dword [0x420ede8]
push eax
test ecx, ecx
je 0x4984f8
call ecx
jmp 0x4984fd
call fcn.0042a55b
add esp, 4
mov ecx, dword [esi + 0xc]
test ecx, ecx
je 0x49850e
xor edx, edx
call fcn.00466d10
mov ecx, dword [esi + 0x10]
test ecx, ecx
je 0x49851c
xor edx, edx
call fcn.00466d10
mov eax, dword [esi + 0x18]
mov dword [esp + 0x48], eax
test eax, eax
je 0x498565
test byte [eax + 0x20], 1
je 0x49854e
mov ecx, dword [eax + 0x18]
test ecx, ecx
je 0x49854e
mov eax, dword [0x420ede8]
push ecx
test eax, eax
je 0x498542
call eax
jmp 0x498547
call fcn.0042a55b
mov eax, dword [esp + 0x4c]
add esp, 4
mov ecx, dword [0x420ede8]
push eax
test ecx, ecx
je 0x49855d
call ecx
jmp 0x498562
call fcn.0042a55b
add esp, 4
mov eax, dword [esi + 0x258]
test eax, eax
je 0x498590
mov ecx, dword [0x420ede8]
push eax
test ecx, ecx
je 0x49857e
call ecx
jmp 0x498583
call fcn.0042a55b
add esp, 4
mov dword [esi + 0x258], 0
mov eax, dword [esi + 0xdf0]
test eax, eax
je 0x4985ad
push eax
call fcn.00467af0
add esp, 4
mov dword [esi + 0xdf0], 0
mov ecx, dword [esi + 0xdf8]
test ecx, ecx
je 0x4985c6
call fcn.00463e40
mov dword [esi + 0xdf8], 0
mov ecx, dword [esi + 0xdfc]
test ecx, ecx
je 0x4985df
call fcn.0046e7c0
mov dword [esi + 0xdfc], 0
mov eax, dword [esi + 0x25c]
test eax, eax
je 0x49860a
mov ecx, dword [0x420ede8]
push eax
test ecx, ecx
je 0x4985f8
call ecx
jmp 0x4985fd
call fcn.0042a55b
add esp, 4
mov dword [esi + 0x25c], 0
mov ecx, dword [esi + 0x78]
test ecx, ecx
je 0x49861d
call fcn.004b0400
mov dword [esi + 0x78], 0
lea eax, [esi + 0x230]
push eax
call dword [sym.imp.KERNEL32.dll_DeleteCriticalSection]
mov eax, dword [0x420ede8]
push esi
test eax, eax
je 0x498638
call eax
jmp 0x49863d
call fcn.0042a55b
add esp, 4
mov esi, dword [esp + 0x44]
mov dword [esp + 0x54], esi
test esi, esi
je 0x498801
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 0x498801
mov esi, dword [esp + 0x54]
lea eax, [esi + 0x40]
test eax, eax
je 0x4986bc
mov ecx, dword [eax + 8]
test ecx, ecx
je 0x4986b8
call fcn.004cf2c0
mov ecx, dword [esi + 0x48]
lea eax, [esi + 0x40]
test ecx, ecx
je 0x4986b1
mov eax, dword [0x420ede8]
push ecx
test eax, eax
je 0x4986a6
call eax
jmp 0x4986ab
call fcn.0042a55b
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 0x4986e1
mov ecx, dword [0x420ede8]
push eax
test ecx, ecx
je 0x4986d2
call ecx
jmp 0x4986d7
call fcn.0042a55b
add esp, 4
mov dword [esi + 0x2c], 0
mov eax, dword [esi + 4]
cmp eax, 0x12
jg 0x49876c
je 0x498749
sub eax, 0x10
je 0x498723
sub eax, 1
jne 0x4987e1
mov ecx, dword [esi + 0x34]
test ecx, ecx
je 0x4987e1
test byte [esi + 0x76], 4
je 0x4987e1
call fcn.0046d950
mov dword [esi + 0x34], 0
jmp 0x4987e1
mov ecx, dword [esi + 0x30]
test ecx, ecx
je 0x4987e1
test byte [esi + 0x76], 8
je 0x4987e1
call fcn.0046e340
mov dword [esi + 0x30], 0
jmp 0x4987e1
mov ecx, dword [esi + 0x38]
test ecx, ecx
je 0x4987e1
test byte [esi + 0x76], 2
je 0x4987e1
call fcn.0046cab0
mov dword [esi + 0x38], 0
jmp 0x4987e1
cmp eax, 0x1c
je 0x4987c8
cmp eax, 0x40c
jne 0x4987e1
mov ecx, dword [esi + 0x54]
test ecx, ecx
je 0x49878b
call fcn.00472b30
mov dword [esi + 0x54], 0
mov ecx, dword [esi + 0x5c]
test ecx, ecx
je 0x49879e
call fcn.00472b30
mov dword [esi + 0x5c], 0
mov ecx, dword [esi + 0x64]
test ecx, ecx
je 0x4987b1
call fcn.00472b30
mov dword [esi + 0x64], 0
mov dword [esi + 0x58], 0
mov dword [esi + 0x60], 0
mov dword [esi + 0x68], 0
jmp 0x4987e1
mov ecx, dword [esi + 0x3c]
test ecx, ecx
je 0x4987e1
test byte [esi + 0x76], 1
je 0x4987e1
call fcn.0046d5b0
mov dword [esi + 0x3c], 0
lea eax, [esi + 0x14]
push eax
call dword [sym.imp.KERNEL32.dll_DeleteCriticalSection]
mov eax, dword [0x420ede8]
push esi
test eax, eax
je 0x4987f9
call eax
jmp 0x4987fe
call fcn.0042a55b
add esp, 4
mov esi, 2
mov al, byte [edi + 0x420]
and al, 6
cmp al, 4
jne 0x498836
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 0x498951
mov ecx, edi
call fcn.00467ff0
test eax, eax
jne 0x498dcb
mov eax, dword [edi + 0x278]
test eax, eax
jne 0x49885b
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.004736c0
add esp, 4
mov dword [esp + 0x28], eax
test eax, eax
js 0x498dcb
mov ecx, dword [esp + 0x30]
mov dword [esp + 0x34], ecx
cmp cx, 2
jbe 0x4988f4
cmp dword [edi + 0x294], 0
jne 0x4988f4
push dword [edi + 0x84]
movzx edx, cx
lea ecx, [edi + 0x294]
push 0
call fcn.004b1e50
add esp, 8
test eax, eax
js 0x498dcb
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.00473490
add esp, 8
mov dword [esp + 0x28], eax
test eax, eax
js 0x498dcb
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 0x498949
mov ecx, dword [edi + 0x290]
test ecx, ecx
jle 0x498945
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 0x498951
mov ecx, dword [esp + 0x20]
mov dword [esp + 0x38], 0
mov eax, dword [edi + 0x2d0]
mov dword [esp + 0x64], edx
test eax, eax
je 0x49896d
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 0x498d9e
nop dword [eax]
test eax, eax
jne 0x498d9e
mov dword [esp + 0x14], 5
cmp dword [edi + 0x2d0], eax
jne 0x4989c0
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 0x4989cd
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.004896a0
mov dword [esp + 0x28], eax
test eax, eax
jne 0x498dcb
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 0x498ad6
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 0x498bcc
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 0x498af9
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 0x498bcc
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 0x498bcc
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.00498df0
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 0x498bd0
lea eax, [edi + 0x294]
test eax, eax
je 0x498bd0
mov ecx, dword [eax]
mov dword [esp + 0x54], ecx
test ecx, ecx
je 0x498bd0
cmp dword [ecx + 0xc], 1
jne 0x498b9f
mov eax, dword [ecx]
test eax, eax
je 0x498b9f
mov ecx, dword [ecx + 8]
test ecx, ecx
je 0x498b9b
nop dword [eax + eax]
mov byte [eax], 0
lea eax, [eax + 1]
sub ecx, 1
jne 0x498b90
mov ecx, dword [esp + 0x54]
mov eax, dword [0x420ede8]
mov dword [ecx], 0
mov dword [ecx + 8], 0
push ecx
test eax, eax
je 0x498bba
call eax
jmp 0x498bbf
call fcn.0042a55b
add esp, 4
mov dword [edi + 0x294], 0
mov edx, dword [esp + 0xc]
cmp dword [esp + 0x38], 0
jbe 0x498cb6
test edx, edx
je 0x498cb6
lea eax, [ebx + 2]
cmp esi, eax
jne 0x498c33
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 0x498cb4
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 0x498cb6
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 0x498c69
add eax, dword [esp + 0x3c]
push esi
push eax
mov eax, dword [esp + 0x1c]
add eax, dword [esp + 0x18]
push eax
call fcn.0041d1d0
mov edx, dword [esp + 0x18]
add esp, 0xc
mov ecx, esi
cmp esi, edx
je 0x498c8f
mov eax, ebx
sub eax, ecx
sub eax, dword [esp + 0x1c]
add eax, 2
cmp eax, edx
ja 0x498c8d
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 0x498cb6
mov esi, dword [esp + 0x1c]
jmp 0x498be3
xor ebx, ebx
mov eax, dword [esp + 0x14]
add eax, 0xfffffffb
js 0x498ddb
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.0049dfa0
mov ecx, eax
add esp, 0x1c
mov dword [esp + 0x54], ecx
test ecx, ecx
js 0x498dd2
cmp byte [edi + 0x4f9], 0
je 0x498d64
mov eax, dword [edi + 0x4f0]
mov dword [esp + 0x5c], eax
test eax, eax
je 0x498d60
test ecx, ecx
jle 0x498d60
cmp byte [edi + 0x40c], 1
je 0x498d60
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 0x498d68
mov eax, dword [esp + 0x28]
add dword [edi + 0x218], ecx
mov ecx, 0xf7ff
and word [edi + 0x426], cx
test byte [edi + 0x424], 0x80
jne 0x498d8a
mov ecx, edi
call fcn.00490250
mov edx, dword [esp + 0x18]
mov esi, dword [esp + 0x1c]
mov ecx, dword [esp + 0x20]
test edx, edx
jne 0x498980
cmp eax, 0xfffffeb9
je 0x498dcb
mov ecx, 0xf7ff
mov dword [edi + 0x2d0], 0
and word [edi + 0x426], cx
test byte [edi + 0x420], 0x60
jne 0x498dcb
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