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

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x114
mov edx, dword [ebp + 0x10]
mov ecx, dword [ebp + 8]
xor eax, eax
push ebx
push esi
mov esi, dword [ebp + 0x18]
push edi
lea edi, [edx + esi*2]
lea ebx, [edi - 2]
mov dword [esp + 0x28], eax
mov dword [esp + 0x2c], eax
mov dword [esp + 0x44], eax
mov dword [esp + 0x20], eax
mov dword [esp + 0x1c], eax
mov dword [esp + 0x3c], eax
mov dword [esp + 0x18], eax
mov dword [esp + 0x38], eax
mov dword [esp + 0x48], edi
mov dword [esp + 0x30], eax
mov dword [esp + 0x4c], ebx
cmp ecx, eax
jne 0x497450
cmp dword [ebp + 0xc], eax
jne 0x497450
cmp edx, eax
jne 0x497450
cmp dword [ebp + 0x14], 0xfffffc19
jne 0x497450
cmp esi, 0xfffffc19
jne 0x497450
push eax
push eax
push eax
push eax
push eax
push eax
push eax
call fcn.0048f270
add esp, 0x1c
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov ebx, dword [ebp + 0x1c]
test ebx, 0xe20f5a6f
je 0x497467
mov eax, 0xfffffffd
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
cmp ecx, eax
je 0x4980ff
cmp edx, eax
je 0x4980ff
cmp dword [ebp + 0x20], eax
jne 0x497485
cmp dword [ebp + 0x24], eax
jg 0x4980ff
cmp dword [ebp + 0x24], eax
jge 0x497496
mov eax, 0xfffffff1
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
cmp esi, eax
jl 0x4980f3
cmp esi, dword [ebp + 0x14]
jg 0x4980f3
mov edx, dword [ecx]
cmp edx, 0x50435245
je 0x4974c8
lea eax, [edx - 0x45524350]
neg eax
sbb eax, eax
and eax, 0x19
add eax, 0xffffffe3
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
movzx edx, word [ecx + 0xc]
test dl, 2
jne 0x4974dd
mov eax, 0xffffffe4
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov dword [esp + 0xac], 1
test ebx, 0x8000000
je 0x4974f7
mov edx, 2
jmp 0x4974ff
mov edx, ebx
shr edx, 0xf
and edx, 1
mov dword [esp + 0xec], edx
test ebx, 0x2000
jne 0x49753a
cmp esi, eax
jle 0x49753a
cmp esi, dword [ebp + 0x14]
jge 0x49753a
mov edx, edi
mov dx, word [edx]
mov esi, 0xfc00
and dx, si
mov esi, 0xdc00
cmp dx, si
jne 0x49753a
mov eax, 0xfffffff5
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
movzx edx, word [ecx + 0x18]
mov ebx, dword [ebp + 0xc]
mov esi, dword [ecx + 0x20]
lea edx, [ecx + edx*2]
mov dword [esp + 0x88], edx
movzx edx, word [ecx + 0x1c]
mov dword [esp + 0x80], edx
movzx edx, word [ecx + 0x1a]
mov dword [esp + 0x84], edx
mov dword [esp + 0x34], eax
mov dword [esp + 0x64], 0x989680
mov dword [esp + 0x68], 0x1770
mov dword [esp + 0x10c], eax
cmp ebx, eax
je 0x4975e3
mov ebx, dword [ebx]
mov dword [esp + 0x10], ebx
test bl, 1
je 0x49759c
mov ebx, dword [ebp + 0xc]
mov ebx, dword [ebx + 4]
mov dword [esp + 0x34], ebx
mov ebx, dword [esp + 0x10]
test bl, 2
je 0x4975af
mov ebx, dword [ebp + 0xc]
mov ebx, dword [ebx + 8]
mov dword [esp + 0x64], ebx
mov ebx, dword [esp + 0x10]
test bl, 0x10
je 0x4975c2
mov ebx, dword [ebp + 0xc]
mov ebx, dword [ebx + 0x14]
mov dword [esp + 0x68], ebx
mov ebx, dword [esp + 0x10]
test bl, 4
je 0x4975d8
mov ebx, dword [ebp + 0xc]
mov ebx, dword [ebx + 0xc]
mov dword [esp + 0x10c], ebx
mov ebx, dword [esp + 0x10]
test bl, 8
je 0x4975e3
mov esi, dword [ebp + 0xc]
mov esi, dword [esi + 0x10]
cmp esi, eax
jne 0x4975ec
mov esi, 0x4cbd08
mov eax, dword [ecx + 8]
mov ecx, eax
or ecx, dword [ebp + 0x1c]
mov dword [esp + 0x94], esi
shr ecx, 4
and ecx, 1
mov dword [esp + 0x40], ecx
mov ecx, dword [ebp + 8]
movzx ecx, word [ecx + 0xc]
mov ebx, ecx
shr ebx, 8
and ebx, 1
mov dword [esp + 0x54], ebx
mov ebx, eax
shr ebx, 0x12
and ebx, 1
mov dword [esp + 0x5c], ebx
mov ebx, dword [ebp + 8]
movzx ebx, word [ebx + 0x1c]
imul edx, ebx
mov ebx, dword [ebp + 8]
movzx ebx, word [ebx + 0x18]
add edx, ebx
mov ebx, dword [ebp + 8]
lea edx, [ebx + edx*2]
mov ebx, dword [ebp + 0x18]
mov dword [esp + 0xf8], ebx
mov ebx, dword [ebp + 0x14]
mov dword [esp + 0xd4], edx
mov edx, dword [ebp + 0x10]
mov dword [esp + 0xd8], edx
lea edx, [edx + ebx*2]
mov dword [esp + 0xdc], edx
mov dword [esp + 0x14], edx
mov edx, eax
shr edx, 5
and edx, 1
mov dword [esp + 0xb8], edx
mov edx, eax
shr edx, 0x1d
and edx, 1
mov dword [esp + 0xb4], edx
mov edx, eax
shr edx, 0x19
and edx, 1
mov dword [esp + 0xb0], edx
mov edx, dword [ebp + 0x1c]
mov ebx, edx
shr ebx, 7
and ebx, 1
mov dword [esp + 0xa4], ebx
mov ebx, edx
shr ebx, 8
and ebx, 1
mov dword [esp + 0xa8], ebx
mov ebx, edx
shr ebx, 0xa
and ebx, 1
shr ecx, 0xc
mov dword [esp + 0xbc], ebx
and ecx, 1
mov ebx, edx
shr ebx, 0x1c
mov dword [esp + 0xcc], ecx
lea ecx, [esi + 0x100]
and ebx, 1
mov dword [esp + 0x98], ecx
mov dword [esp + 0xc0], ebx
xor ebx, ebx
add esi, 0x340
mov ecx, edx
and ecx, 0x1800000
mov dword [esp + 0xd0], 0
mov dword [esp + 0xc4], ebx
mov dword [esp + 0x114], ebx
mov dword [esp + 0x110], ebx
mov dword [esp + 0x108], ebx
mov dword [esp + 0x9c], esi
je 0x497758
cmp ecx, 0x800000
je 0x49774b
cmp ecx, 0x1000000
je 0x497770
mov eax, 0xffffffe9
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov dword [esp + 0xc8], 1
jmp 0x497777
test eax, 0x1800000
je 0x497770
mov edx, eax
shr edx, 0x17
and edx, 1
mov dword [esp + 0xc8], edx
jmp 0x497777
mov dword [esp + 0xc8], ebx
mov ecx, dword [ebp + 0x1c]
test ecx, 0x700000
je 0x497784
mov eax, ecx
and eax, 0x700000
cmp eax, 0x300000
ja 0x4977ea
je 0x4977e3
test eax, eax
je 0x4977e3
cmp eax, 0x100000
je 0x4977dc
cmp eax, 0x200000
jne 0x49773f
mov eax, 0xa
mov dword [esp + 0x78], ebx
cmp eax, 0xff
jle 0x497810
mov ecx, eax
sar ecx, 8
movzx edx, al
and ecx, 0xff
mov dword [esp + 0x7c], 2
mov word [esp + 0x8c], cx
mov word [esp + 0x8e], dx
jmp 0x497820
mov eax, 0xd
jmp 0x4977a9
mov eax, 0xd0a
jmp 0x4977a9
cmp eax, 0x400000
je 0x497806
cmp eax, 0x500000
jne 0x49773f
mov dword [esp + 0x78], 2
jmp 0x497820
mov dword [esp + 0x78], 1
jmp 0x497820
mov dword [esp + 0x7c], 1
mov word [esp + 0x8c], ax
cmp dword [esp + 0xec], ebx
je 0x497843
mov eax, dword [ebp + 8]
movzx eax, word [eax + 0xc]
test eax, 0x200
je 0x497843
mov eax, 0xfffffff3
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov eax, 0x55555556
imul dword [ebp + 0x24]
mov eax, edx
shr eax, 0x1f
add eax, edx
lea ebx, [eax + eax*2]
lea ecx, [ebx + ebx]
mov eax, 0x55555556
imul ecx
mov ecx, dword [ebp + 8]
mov eax, edx
shr eax, 0x1f
add eax, edx
mov dword [esp + 0x50], eax
movzx eax, word [ecx + 0x12]
mov dword [esp + 0x58], ebx
test ax, ax
je 0x4978c5
mov ecx, eax
mov eax, 0x55555556
imul ebx
mov eax, edx
shr eax, 0x1f
add eax, edx
cmp ecx, eax
jl 0x4978c5
lea ebx, [ecx + ecx*2 + 3]
lea ecx, [ebx*4]
push ecx
mov dword [esp + 0x5c], ebx
call dword [0x4d4458]
mov esi, eax
add esp, 4
mov dword [esp + 0x6c], esi
test esi, esi
jne 0x4978bb
lea eax, [esi - 6]
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov dword [esp + 0x28], 1
jmp 0x4978cc
mov esi, dword [ebp + 0x20]
mov dword [esp + 0x6c], esi
lea ecx, [ebx + ebx]
mov eax, 0x55555556
imul ecx
mov eax, edx
shr eax, 0x1f
add eax, edx
mov dword [esp + 0x70], ebx
mov dword [esp + 0x74], eax
mov dword [esp + 0xa0], 0
mov dword [esp + 0xf4], 0xffffffff
test esi, esi
je 0x497943
mov ecx, dword [ebp + 8]
movzx edx, word [ecx + 0x10]
add edx, edx
lea eax, [esi + ebx*4]
add edx, edx
mov ecx, eax
sub ecx, edx
lea edx, [esi + 8]
cmp ecx, edx
jae 0x49791a
mov ecx, edx
sub eax, 4
cmp eax, ecx
jb 0x497932
mov dword [eax], 0xffffffff
sub eax, 4
cmp eax, ecx
jae 0x497921
mov esi, dword [esp + 0x6c]
mov dword [esi + 4], 0xffffffff
mov eax, dword [esp + 0x6c]
mov dword [eax], 0xffffffff
cmp dword [esp + 0x40], 0
mov esi, dword [ebp + 8]
jne 0x4979f1
movzx eax, word [esi + 0xc]
test al, 0x10
je 0x4979d5
movzx ecx, word [esi + 0x14]
movzx edx, cx
mov dword [esp + 0x2c], 1
mov dword [esp + 0x1c], ecx
mov dword [esp + 0x20], edx
test al, 0x20
je 0x4979f1
mov eax, 0xff
cmp cx, ax
ja 0x497994
mov eax, dword [esp + 0x98]
movzx ecx, cx
movzx eax, byte [ecx + eax]
mov dword [esp + 0x1c], eax
cmp edx, 0x7f
jbe 0x4979f1
movzx eax, dx
mov ecx, eax
shr ecx, 7
movzx ecx, byte [ecx + 0x4be208]
shl ecx, 7
and eax, 0x8000007f
jns 0x4979b7
dec eax
or eax, 0xffffff80
inc eax
add ecx, eax
movzx eax, word [ecx*2 + 0x4c0408]
mov cx, word [eax*8 + 0x4bd12c]
add cx, dx
movzx edx, cx
mov dword [esp + 0x1c], edx
jmp 0x4979f1
cmp dword [esp + 0x54], 0
jne 0x4979f1
mov eax, dword [esp + 0x34]
test eax, eax
je 0x4979f1
test byte [eax + 4], 1
je 0x4979f1
add eax, 8
mov dword [esp + 0x38], eax
movzx eax, word [esi + 0xc]
test al, 0x40
je 0x497a6f
movzx ecx, word [esi + 0x16]
movzx edx, cx
mov dword [esp + 0x44], 1
mov dword [esp + 0x18], ecx
mov dword [esp + 0x3c], edx
test al, al
jns 0x497a6f
mov eax, 0xff
cmp cx, ax
ja 0x497a30
mov eax, dword [esp + 0x98]
movzx ecx, cx
movzx eax, byte [ecx + eax]
mov dword [esp + 0x18], eax
cmp edx, 0x7f
jbe 0x497a6f
movzx eax, dx
mov ecx, eax
shr ecx, 7
movzx ecx, byte [ecx + 0x4be208]
shl ecx, 7
and eax, 0x8000007f
jns 0x497a53
dec eax
or eax, 0xffffff80
inc eax
add ecx, eax
movzx eax, word [ecx*2 + 0x4c0408]
mov cx, word [eax*8 + 0x4bd12c]
add cx, dx
movzx edx, cx
mov dword [esp + 0x18], edx
cmp dword [esp + 0x5c], 0
mov ebx, dword [esp + 0x14]
mov esi, dword [esp + 0x7c]
mov edx, dword [esp + 0xd8]
mov eax, dword [esp + 0xdc]
mov dword [esp + 0x24], ebx
je 0x497b36
mov ecx, edi
cmp edi, eax
jae 0x497b34
mov edi, edi
cmp dword [esp + 0x78], 0
je 0x497ad3
mov edx, dword [esp + 0x78]
push 1
push edx
lea esi, [esp + 0x84]
mov edx, eax
call fcn.00498560
mov esi, dword [esp + 0x84]
add esp, 8
test eax, eax
jne 0x497b2d
mov eax, dword [esp + 0xdc]
jmp 0x497b02
lea edx, [esi + esi]
mov ebx, eax
sub ebx, edx
cmp ecx, ebx
ja 0x497afe
mov dx, word [ecx]
cmp dx, word [esp + 0x8c]
jne 0x497afe
cmp esi, 1
je 0x497b2d
mov dx, word [ecx + 2]
cmp dx, word [esp + 0x8e]
je 0x497b2d
mov ebx, dword [esp + 0x14]
add ecx, 2
cmp ecx, ebx
jae 0x497b25
mov dx, word [ecx]
mov ebx, 0xfc00
and dx, bx
mov ebx, 0xdc00
cmp dx, bx
mov ebx, dword [esp + 0x14]
jne 0x497b25
add ecx, 2
cmp ecx, eax
jb 0x497aa0
mov edx, dword [esp + 0xd8]
mov ebx, ecx
mov eax, dword [ebp + 8]
mov eax, dword [eax + 8]
or eax, dword [ebp + 0x1c]
and eax, 0x4000000
mov dword [esp + 0x10], eax
jne 0x497cd0
cmp dword [esp + 0x2c], 0
je 0x497bba
mov cx, word [esp + 0x1c]
cmp word [esp + 0x20], cx
je 0x497b95
cmp edi, ebx
jae 0x497cd0
lea esp, [esp]
movzx eax, word [edi]
cmp ax, word [esp + 0x20]
je 0x497cd0
cmp ax, word [esp + 0x1c]
je 0x497cd0
add edi, 2
cmp edi, ebx
jb 0x497b70
jmp 0x497cd0
cmp edi, ebx
jae 0x497cd0
lea ecx, [ecx]
mov dx, word [esp + 0x20]
cmp word [edi], dx
je 0x497cd0
add edi, 2
cmp edi, ebx
jb 0x497ba0
jmp 0x497cd0
cmp dword [esp + 0x54], 0
je 0x497c8d
mov eax, dword [ebp + 0x18]
lea ecx, [edx + eax*2]
cmp edi, ecx
jbe 0x497cd0
cmp edi, ebx
jae 0x497c69
jmp 0x497be0
cmp dword [esp + 0x78], 0
je 0x497c14
cmp edi, edx
jbe 0x497c42
mov eax, dword [esp + 0x78]
push 1
push eax
lea esi, [esp + 0x84]
mov ecx, edi
call fcn.00498620
add esp, 8
test eax, eax
jne 0x497c69
mov edx, dword [esp + 0xd8]
mov esi, dword [esp + 0x7c]
jmp 0x497c42
lea ecx, [esi + esi]
lea eax, [ecx + edx]
cmp edi, eax
jb 0x497c42
mov eax, edi
sub eax, ecx
mov cx, word [esp + 0x8c]
cmp word [eax], cx
jne 0x497c42
cmp esi, 1
je 0x497c69
mov cx, word [esp + 0x8e]
cmp word [eax + 2], cx
je 0x497c69
add edi, 2
cmp edi, ebx
jae 0x497c69
mov ax, word [edi]
mov ecx, 0xfc00
and ax, cx
mov ecx, 0xdc00
cmp ax, cx
jne 0x497c61
add edi, 2
cmp edi, ebx
jb 0x497be0
cmp word [edi - 2], 0xd
jne 0x497cd0
mov eax, dword [esp + 0x78]
cmp eax, 1
je 0x497c7e
cmp eax, 2
jne 0x497cd0
cmp edi, ebx
jae 0x497cd0
cmp word [edi], 0xa
jne 0x497cd0
add edi, 2
jmp 0x497cd0
cmp dword [esp + 0x38], 0
je 0x497cd0
cmp edi, ebx
jae 0x497cd0
jmp 0x497ca0
movzx eax, word [edi]
cmp eax, 0xff
jbe 0x497caf
mov eax, 0xff
mov ecx, eax
and ecx, 7
mov edx, 1
shl edx, cl
mov ecx, dword [esp + 0x38]
shr eax, 3
mov al, byte [eax + ecx]
test al, dl
jne 0x497cd0
add edi, 2
cmp edi, ebx
jb 0x497ca0
mov esi, dword [esp + 0x24]
xor ebx, ebx
mov dword [esp + 0x14], esi
cmp dword [esp + 0x10], ebx
jne 0x497da7
cmp dword [esp + 0xec], ebx
jne 0x497da7
mov eax, dword [esp + 0x34]
cmp eax, ebx
je 0x497d0e
test byte [eax + 4], 2
je 0x497d0e
mov ecx, esi
sub ecx, edi
sar ecx, 1
cmp ecx, dword [eax + 0x28]
jb 0x497e14
cmp dword [esp + 0x44], ebx
je 0x497da7
mov edx, esi
sub edx, edi
and edx, 0xfffffffe
cmp edx, 0x7d0
jge 0x497da7
xor eax, eax
cmp dword [esp + 0x2c], ebx
setne al
lea eax, [edi + eax*2]
cmp eax, dword [esp + 0x4c]
jbe 0x497da7
mov ecx, dword [esp + 0x3c]
cmp cx, word [esp + 0x18]
je 0x497d7b
cmp eax, esi
jae 0x497d67
movzx edx, cx
nop
movzx ecx, word [eax]
add eax, 2
cmp ecx, edx
je 0x497d74
movzx ebx, word [esp + 0x18]
cmp ecx, ebx
je 0x497d74
cmp eax, esi
jb 0x497d50
mov dword [esp + 0x10], 0
jmp 0x497f7a
sub eax, 2
xor ebx, ebx
jmp 0x497d9f
cmp eax, esi
jae 0x497d67
nop
mov dx, word [eax]
add eax, 2
cmp dx, cx
je 0x497d9c
cmp eax, esi
jb 0x497d80
mov dword [esp + 0x10], 0
jmp 0x497f7a
sub eax, 2
cmp eax, esi
jae 0x497d67
mov dword [esp + 0x4c], eax
mov ecx, dword [esp + 0xd4]
push ebx
push ebx
lea eax, [esp + 0x68]
push eax
push 2
push edi
push ecx
push edi
mov dword [esp + 0xfc], edi
mov dword [esp + 0x104], edi
mov dword [esp + 0x7c], ebx
mov dword [esp + 0x118], ebx
mov dword [esp + 0x10c], ebx
call fcn.0048f270
add esp, 0x1c
mov dword [esp + 0x10], eax
cmp dword [esp + 0xc4], ebx
je 0x497e00
cmp dword [esp + 0x30], ebx
jne 0x497e00
mov edx, dword [esp + 0xe8]
mov dword [esp + 0x30], edx
cmp eax, 0xfffffc1d
jg 0x497e1d
je 0x497e5c
cmp eax, 0xfffffc1a
jne 0x497f66
mov dword [esp + 0x10], ebx
jmp 0x497f7a
cmp eax, 0xfffffc20
jg 0x497e54
je 0x497e5c
cmp eax, 0xfffffc1e
je 0x497e47
cmp eax, 0xfffffc1f
jne 0x497f66
mov ebx, edi
mov dword [esp + 0xd0], 1
jmp 0x497e88
mov ebx, dword [esp + 0xe0]
cmp ebx, edi
je 0x497e5c
jmp 0x497e88
cmp eax, ebx
jne 0x497f66
lea ebx, [edi + 2]
mov dword [esp + 0xd0], 0
cmp ebx, dword [esp + 0x24]
jae 0x497e88
mov ax, word [ebx]
mov ecx, 0xfc00
and ax, cx
mov edx, 0xdc00
cmp ax, dx
jne 0x497e88
add ebx, 2
cmp dword [esp + 0x5c], 0
mov dword [esp + 0x10], 0
je 0x497f08
cmp dword [esp + 0x78], 0
je 0x497ed0
cmp edi, dword [esp + 0xdc]
jae 0x497f08
mov eax, dword [esp + 0x78]
mov edx, dword [esp + 0xdc]
push 1
push eax
lea esi, [esp + 0x84]
mov ecx, edi
call fcn.00498560
add esp, 8
test eax, eax
jne 0x497f7a
jmp 0x497f08
mov eax, dword [esp + 0x7c]
mov edx, dword [esp + 0xdc]
lea ecx, [eax + eax]
sub edx, ecx
cmp edi, edx
ja 0x497f08
mov cx, word [edi]
cmp cx, word [esp + 0x8c]
jne 0x497f08
cmp eax, 1
je 0x497f7a
mov dx, word [edi + 2]
cmp dx, word [esp + 0x8e]
je 0x497f7a
cmp dword [esp + 0x40], 0
mov edi, ebx
jne 0x497f7a
mov eax, dword [esp + 0x24]
cmp ebx, eax
ja 0x497f7a
cmp ebx, dword [esp + 0x48]
jbe 0x497f56
cmp word [ebx - 2], 0xd
jne 0x497f56
cmp ebx, eax
jae 0x497f56
cmp word [ebx], 0xa
jne 0x497f56
mov ecx, dword [ebp + 8]
mov eax, 0x800
test word [ecx + 0xc], ax
jne 0x497f56
mov eax, dword [esp + 0x78]
cmp eax, 1
je 0x497f53
cmp eax, 2
je 0x497f53
cmp dword [esp + 0x7c], 2
jne 0x497f56
lea edi, [ebx + 2]
mov dword [esp + 0x110], 0
jmp 0x497a6f
cmp eax, 1
je 0x497ff6
cmp eax, 0xfffffc19
je 0x497ff6
cmp dword [esp + 0x28], 0
je 0x497f8f
mov edx, dword [esp + 0x6c]
push edx
call dword [0x4d445c]
add esp, 4
mov eax, dword [esp + 0x10]
test eax, eax
je 0x497fa0
cmp eax, 0xfffffff4
jne 0x498104
mov eax, dword [esp + 0x30]
test eax, eax
je 0x497fcc
cmp dword [ebp + 0x24], 1
jle 0x497fc5
mov edx, dword [ebp + 0x10]
mov ecx, dword [ebp + 0x20]
sub eax, edx
sar eax, 1
mov dword [ecx], eax
mov eax, dword [esp + 0x24]
sub eax, edx
sar eax, 1
mov dword [ecx + 4], eax
mov eax, 0xfffffff4
jmp 0x497fcf
or eax, 0xffffffff
mov ecx, dword [ebp + 0xc]
test ecx, ecx
je 0x498104
test byte [ecx], 0x20
je 0x498104
mov ecx, dword [ecx + 0x18]
mov edx, dword [esp + 0x114]
mov dword [ecx], edx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
cmp dword [esp + 0x28], 0
mov edi, dword [esp + 0x50]
je 0x498043
mov esi, dword [esp + 0x6c]
cmp edi, 4
jl 0x498025
mov edx, dword [ebp + 0x20]
lea eax, [edi*4 - 8]
push eax
lea ecx, [esi + 8]
push ecx
add edx, 8
push edx
call fcn.004a3100
add esp, 0xc
cmp dword [esp + 0xf0], edi
jle 0x498039
mov dword [esp + 0xa0], 1
push esi
call dword [0x4d445c]
add esp, 4
cmp dword [esp + 0xa0], 0
mov esi, dword [esp + 0xf0]
je 0x49805c
cmp esi, edi
jl 0x49805c
xor ebx, ebx
jmp 0x498065
mov eax, esi
cdq
sub eax, edx
mov ebx, eax
sar ebx, 1
mov eax, dword [ebp + 8]
movzx ecx, word [eax + 0x10]
mov eax, esi
cdq
sub eax, edx
sar eax, 1
cmp eax, ecx
jg 0x4980a3
cmp dword [ebp + 0x20], 0
je 0x4980a3
lea eax, [ecx + ecx + 2]
cmp eax, dword [ebp + 0x24]
jle 0x49808a
mov eax, dword [esp + 0x58]
mov ecx, dword [ebp + 0x20]
lea edi, [ecx + esi*4]
lea ecx, [ecx + eax*4]
cmp edi, ecx
jae 0x4980a3
sub ecx, edi
dec ecx
shr ecx, 2
inc ecx
or eax, 0xffffffff
rep stosd dword es:[edi], eax
cmp dword [ebp + 0x24], 2
jge 0x4980ad
xor ebx, ebx
jmp 0x4980d2
mov eax, dword [esp + 0xd8]
mov edx, dword [esp + 0xe0]
mov ecx, dword [ebp + 0x20]
sub edx, eax
sar edx, 1
mov dword [ecx], edx
mov edx, dword [esp + 0xe4]
sub edx, eax
sar edx, 1
mov dword [ecx + 4], edx
mov eax, dword [ebp + 0xc]
test eax, eax
je 0x4980ea
test byte [eax], 0x20
je 0x4980ea
mov eax, dword [eax + 0x18]
mov ecx, dword [esp + 0x110]
mov dword [eax], ecx
mov eax, ebx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov eax, 0xffffffe8
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov eax, 0xfffffffe
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret