Function at 0x45bc40
Capabilities:
Get common file path

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x830
mov eax, dword [0x663000]
xor eax, ebp
mov dword [ebp - 8], eax
push ebx
push esi
mov esi, dword [ebp + 8]
lea eax, [ebp - 0x80c]
push edi
push 0x104
mov edi, edx
mov dword [ebp - 0x818], esi
mov ebx, ecx
mov dword [ebp - 0x814], edi
push eax
mov dword [ebp - 0x810], ebx
mov dword [ebp - 0x81c], 0
call dword [sym.imp.KERNEL32.dll_GetSystemDirectoryW]
mov ecx, 0x20
test eax, eax
je 0x45cb8c
xor eax, eax
lea ecx, [ebp - 0x40c]
mov word [ebp - 0x606], ax
lea ebx, [ebp - 0x80c]
mov eax, ecx
mov edx, 0x200
sub ebx, eax
lea eax, [edx + 0x7ffffdfe]
test eax, eax
je 0x45bcd4
movzx eax, word [ebx + ecx]
test ax, ax
je 0x45bcd4
mov word [ecx], ax
add ecx, 2
sub edx, 1
jne 0x45bcb6
lea eax, [ecx - 2]
test edx, edx
cmovne eax, ecx
xor ecx, ecx
mov word [eax], cx
mov ecx, 0x200
lea eax, [ebp - 0x40c]
nop dword [eax]
cmp word [eax], 0
je 0x45bcfe
add eax, 2
sub ecx, 1
jne 0x45bcf0
mov edx, 0x200
mov esi, ecx
mov eax, edx
sub eax, ecx
neg esi
sbb esi, esi
and esi, eax
test ecx, ecx
je 0x45bd5c
lea ecx, [ebp - 0x40c]
lea ecx, [ecx + esi*2]
sub edx, esi
je 0x45bd4f
mov edi, str.ddraw.dll
mov eax, SysReAllocString
sub edi, ecx
nop dword [eax]
test eax, eax
je 0x45bd49
movzx esi, word [edi + ecx]
test si, si
je 0x45bd49
mov word [ecx], si
dec eax
add ecx, 2
sub edx, 1
jne 0x45bd30
mov edi, dword [ebp - 0x814]
test edx, edx
lea eax, [ecx - 2]
cmovne eax, ecx
xor ecx, ecx
mov word [eax], cx
lea edx, [ebp - 0x824]
lea ecx, [ebp - 0x40c]
call fcn.0045cbc0
test eax, eax
js 0x45be78
mov ecx, dword [ebp - 0x820]
mov eax, dword [ebp - 0x824]
mov dword [ebp - 0x82c], 0x5f
cmp ecx, 0x40002
ja 0x45bd9c
jb 0x45bdda
cmp eax, 0x5f
ja 0x45bd9c
jb 0x45bdda
mov edx, dword [ebp - 0x810]
test edx, edx
je 0x45bdac
mov dword [edx], 1
test edi, edi
je 0x45bdb6
mov dword [edi], 0
mov esi, dword [ebp - 0x818]
test esi, esi
je 0x45bdce
mov edx, 0x20
mov word [esi], dx
mov edx, dword [ebp - 0x810]
mov dword [ebp - 0x81c], 1
jmp 0x45bde6
mov esi, dword [ebp - 0x818]
mov edx, dword [ebp - 0x810]
mov dword [ebp - 0x82c], 0x448
cmp ecx, 0x40003
ja 0x45be03
jb 0x45be33
cmp eax, 0x448
ja 0x45be03
jb 0x45be33
test edx, edx
je 0x45be0d
mov dword [edx], 2
test edi, edi
je 0x45be17
mov dword [edi], 0
test esi, esi
je 0x45be29
mov edx, 0x20
mov word [esi], dx
mov edx, dword [ebp - 0x810]
mov dword [ebp - 0x81c], 1
mov dword [ebp - 0x82c], 0x44
cmp ecx, 0x40004
ja 0x45be4e
jb 0x45be78
cmp eax, 0x44
ja 0x45be4e
jb 0x45be78
test edx, edx
je 0x45be58
mov dword [edx], 3
test edi, edi
je 0x45be62
mov dword [edi], 0
test esi, esi
je 0x45be6e
mov eax, 0x20
mov word [esi], ax
mov dword [ebp - 0x81c], 1
mov edx, 0x200
lea ecx, [ebp - 0x40c]
lea eax, [edx + 0x7ffffdfe]
test eax, eax
je 0x45bea1
movzx eax, word [ebx + ecx]
test ax, ax
je 0x45bea1
mov word [ecx], ax
add ecx, 2
sub edx, 1
jne 0x45be83
lea eax, [ecx - 2]
test edx, edx
cmovne eax, ecx
xor ecx, ecx
mov word [eax], cx
mov ecx, 0x200
lea eax, [ebp - 0x40c]
nop dword [eax]
cmp word [eax], 0
je 0x45bece
add eax, 2
sub ecx, 1
jne 0x45bec0
mov edi, 0x200
mov esi, ecx
mov eax, edi
sub eax, ecx
neg esi
sbb esi, esi
and esi, eax
test ecx, ecx
je 0x45bf2b
mov edx, edi
lea ecx, [ebp - 0x40c]
lea ecx, [ecx + esi*2]
sub edx, esi
je 0x45bf1e
mov edi, str.d3drg8x.dll
mov eax, SysReAllocString
sub edi, ecx
nop
test eax, eax
je 0x45bf19
movzx esi, word [edi + ecx]
test si, si
je 0x45bf19
mov word [ecx], si
dec eax
add ecx, 2
sub edx, 1
jne 0x45bf00
mov edi, 0x200
test edx, edx
lea eax, [ecx - 2]
cmovne eax, ecx
xor ecx, ecx
mov word [eax], cx
lea edx, [ebp - 0x824]
lea ecx, [ebp - 0x40c]
call fcn.0045cbc0
mov ecx, 0x61
test eax, eax
js 0x45bf9f
cmp dword [ebp - 0x820], 0x40004
mov dword [ebp - 0x82c], 0x46
ja 0x45bf68
jb 0x45bf9f
cmp dword [ebp - 0x824], 0x46
ja 0x45bf68
jb 0x45bf9f
mov eax, dword [ebp - 0x810]
test eax, eax
je 0x45bf78
mov dword [eax], 3
mov eax, dword [ebp - 0x814]
test eax, eax
je 0x45bf88
mov dword [eax], 0
mov eax, dword [ebp - 0x818]
test eax, eax
je 0x45bf95
mov word [eax], cx
mov dword [ebp - 0x81c], 1
mov edx, 0x200
lea ecx, [ebp - 0x40c]
nop word [eax + eax]
lea eax, [edx + 0x7ffffdfe]
test eax, eax
je 0x45bfce
movzx eax, word [ebx + ecx]
test ax, ax
je 0x45bfce
mov word [ecx], ax
add ecx, 2
sub edx, 1
jne 0x45bfb0
lea eax, [ecx - 2]
test edx, edx
cmovne eax, ecx
xor ecx, ecx
mov word [eax], cx
mov ecx, 0x200
lea eax, [ebp - 0x40c]
cmp word [eax], 0
je 0x45bff4
add eax, 2
sub ecx, 1
jne 0x45bfe6
mov eax, edi
mov esi, ecx
sub eax, ecx
neg esi
sbb esi, esi
and esi, eax
test ecx, ecx
je 0x45c046
mov edx, edi
lea ecx, [ebp - 0x40c]
lea ecx, [ecx + esi*2]
sub edx, esi
je 0x45c039
mov edi, str.ddraw.dll
mov eax, SysReAllocString
sub edi, ecx
nop
test eax, eax
je 0x45c039
movzx esi, word [edi + ecx]
test si, si
je 0x45c039
mov word [ecx], si
dec eax
add ecx, 2
sub edx, 1
jne 0x45c020
test edx, edx
lea eax, [ecx - 2]
cmovne eax, ecx
xor ecx, ecx
mov word [eax], cx
lea edx, [ebp - 0x824]
lea ecx, [ebp - 0x40c]
call fcn.0045cbc0
test eax, eax
js 0x45c172
mov ecx, dword [ebp - 0x820]
mov eax, dword [ebp - 0x824]
mov dword [ebp - 0x82c], 0x9b
cmp ecx, 0x40005
ja 0x45c088
jb 0x45c0cc
cmp eax, 0x9b
ja 0x45c088
jb 0x45c0cc
mov esi, dword [ebp - 0x810]
test esi, esi
je 0x45c098
mov dword [esi], 5
mov edx, dword [ebp - 0x814]
test edx, edx
je 0x45c0a8
mov dword [edx], 0
mov edi, dword [ebp - 0x818]
test edi, edi
je 0x45c0c0
mov esi, 0x20
mov word [edi], si
mov esi, dword [ebp - 0x810]
mov dword [ebp - 0x81c], 1
jmp 0x45c0de
mov edi, dword [ebp - 0x818]
mov esi, dword [ebp - 0x810]
mov edx, dword [ebp - 0x814]
mov dword [ebp - 0x82c], 0x13e
cmp ecx, 0x40006
ja 0x45c0fb
jb 0x45c12b
cmp eax, 0x13e
ja 0x45c0fb
jb 0x45c12b
test esi, esi
je 0x45c105
mov dword [esi], 6
test edx, edx
je 0x45c10f
mov dword [edx], 0
test edi, edi
je 0x45c121
mov esi, 0x20
mov word [edi], si
mov esi, dword [ebp - 0x810]
mov dword [ebp - 0x81c], 1
mov dword [ebp - 0x82c], 0x1b4
cmp ecx, 0x40006
ja 0x45c148
jb 0x45c172
cmp eax, 0x1b4
ja 0x45c148
jb 0x45c172
test esi, esi
je 0x45c152
mov dword [esi], 6
test edx, edx
je 0x45c15c
mov dword [edx], 1
test edi, edi
je 0x45c168
mov eax, 0x20
mov word [edi], ax
mov dword [ebp - 0x81c], 1
mov edx, 0x200
lea ecx, [ebp - 0x40c]
nop dword [eax]
lea eax, [edx + 0x7ffffdfe]
test eax, eax
je 0x45c19e
movzx eax, word [ebx + ecx]
test ax, ax
je 0x45c19e
mov word [ecx], ax
add ecx, 2
sub edx, 1
jne 0x45c180
lea eax, [ecx - 2]
test edx, edx
cmovne eax, ecx
xor ecx, ecx
mov word [eax], cx
mov ecx, 0x200
lea eax, [ebp - 0x40c]
cmp word [eax], 0
je 0x45c1c4
add eax, 2
sub ecx, 1
jne 0x45c1b6
mov edi, 0x200
mov esi, ecx
mov eax, edi
sub eax, ecx
neg esi
sbb esi, esi
and esi, eax
test ecx, ecx
je 0x45c21f
mov edx, edi
lea ecx, [ebp - 0x40c]
lea ecx, [ecx + esi*2]
sub edx, esi
je 0x45c212
mov edi, str.dplayx.dll
mov eax, SysReAllocString
sub edi, ecx
test eax, eax
je 0x45c20d
movzx esi, word [edi + ecx]
test si, si
je 0x45c20d
mov word [ecx], si
dec eax
add ecx, 2
sub edx, 1
jne 0x45c1f4
mov edi, 0x200
test edx, edx
lea eax, [ecx - 2]
cmovne eax, ecx
xor ecx, ecx
mov word [eax], cx
lea edx, [ebp - 0x824]
lea ecx, [ebp - 0x40c]
call fcn.0045cbc0
test eax, eax
js 0x45c296
cmp dword [ebp - 0x820], 0x40006
mov dword [ebp - 0x82c], 0x30206
ja 0x45c25a
jb 0x45c296
cmp dword [ebp - 0x824], 0x30206
ja 0x45c25a
jb 0x45c296
mov eax, dword [ebp - 0x810]
test eax, eax
je 0x45c26a
mov dword [eax], 6
mov eax, dword [ebp - 0x814]
test eax, eax
je 0x45c27a
mov dword [eax], 1
mov eax, dword [ebp - 0x818]
test eax, eax
je 0x45c28c
mov ecx, 0x61
mov word [eax], cx
mov dword [ebp - 0x81c], 1
mov edx, 0x200
lea ecx, [ebp - 0x40c]
lea eax, [edx + 0x7ffffdfe]
test eax, eax
je 0x45c2bf
movzx eax, word [ebx + ecx]
test ax, ax
je 0x45c2bf
mov word [ecx], ax
add ecx, 2
sub edx, 1
jne 0x45c2a1
lea eax, [ecx - 2]
test edx, edx
cmovne eax, ecx
xor ecx, ecx
mov word [eax], cx
mov ecx, 0x200
lea eax, [ebp - 0x40c]
cmp word [eax], 0
je 0x45c2e5
add eax, 2
sub ecx, 1
jne 0x45c2d7
mov eax, edi
mov esi, ecx
sub eax, ecx
neg esi
sbb esi, esi
and esi, eax
test ecx, ecx
je 0x45c33b
mov edx, edi
lea ecx, [ebp - 0x40c]
lea ecx, [ecx + esi*2]
sub edx, esi
je 0x45c32e
mov edi, str.ddraw.dll
mov eax, SysReAllocString
sub edi, ecx
test eax, eax
je 0x45c329
movzx esi, word [edi + ecx]
test si, si
je 0x45c329
mov word [ecx], si
dec eax
add ecx, 2
sub edx, 1
jne 0x45c310
mov edi, 0x200
test edx, edx
lea eax, [ecx - 2]
cmovne eax, ecx
xor ecx, ecx
mov word [eax], cx
lea edx, [ebp - 0x824]
lea ecx, [ebp - 0x40c]
call fcn.0045cbc0
test eax, eax
js 0x45c3b2
cmp dword [ebp - 0x820], 0x40007
mov dword [ebp - 0x82c], 0x2bc
ja 0x45c376
jb 0x45c3b2
cmp dword [ebp - 0x824], 0x2bc
ja 0x45c376
jb 0x45c3b2
mov eax, dword [ebp - 0x810]
test eax, eax
je 0x45c386
mov dword [eax], 7
mov eax, dword [ebp - 0x814]
test eax, eax
je 0x45c396
mov dword [eax], 0
mov eax, dword [ebp - 0x818]
test eax, eax
je 0x45c3a8
mov ecx, 0x20
mov word [eax], cx
mov dword [ebp - 0x81c], 1
mov edx, 0x200
lea ecx, [ebp - 0x40c]
nop dword [eax]
lea eax, [edx + 0x7ffffdfe]
test eax, eax
je 0x45c3de
movzx eax, word [ebx + ecx]
test ax, ax
je 0x45c3de
mov word [ecx], ax
add ecx, 2
sub edx, 1
jne 0x45c3c0
lea eax, [ecx - 2]
test edx, edx
cmovne eax, ecx
xor ecx, ecx
mov word [eax], cx
mov ecx, 0x200
lea eax, [ebp - 0x40c]
cmp word [eax], 0
je 0x45c404
add eax, 2
sub ecx, 1
jne 0x45c3f6
mov eax, edi
mov esi, ecx
sub eax, ecx
neg esi
sbb esi, esi
and esi, eax
test ecx, ecx
je 0x45c45b
mov edx, edi
lea ecx, [ebp - 0x40c]
lea ecx, [ecx + esi*2]
sub edx, esi
je 0x45c44e
mov edi, str.dinput.dll
mov eax, SysReAllocString
sub edi, ecx
nop
test eax, eax
je 0x45c449
movzx esi, word [edi + ecx]
test si, si
je 0x45c449
mov word [ecx], si
dec eax
add ecx, 2
sub edx, 1
jne 0x45c430
mov edi, 0x200
test edx, edx
lea eax, [ecx - 2]
cmovne eax, ecx
xor ecx, ecx
mov word [eax], cx
lea edx, [ebp - 0x824]
lea ecx, [ebp - 0x40c]
call fcn.0045cbc0
test eax, eax
js 0x45c4d2
cmp dword [ebp - 0x820], 0x40007
mov dword [ebp - 0x82c], 0x2cc
ja 0x45c496
jb 0x45c4d2
cmp dword [ebp - 0x824], 0x2cc
ja 0x45c496
jb 0x45c4d2
mov eax, dword [ebp - 0x810]
test eax, eax
je 0x45c4a6
mov dword [eax], 7
mov eax, dword [ebp - 0x814]
test eax, eax
je 0x45c4b6
mov dword [eax], 0
mov eax, dword [ebp - 0x818]
test eax, eax
je 0x45c4c8
mov ecx, 0x61
mov word [eax], cx
mov dword [ebp - 0x81c], 1
mov edx, 0x200
lea ecx, [ebp - 0x40c]
nop dword [eax]
lea eax, [edx + 0x7ffffdfe]
test eax, eax
je 0x45c4fe
movzx eax, word [ebx + ecx]
test ax, ax
je 0x45c4fe
mov word [ecx], ax
add ecx, 2
sub edx, 1
jne 0x45c4e0
lea eax, [ecx - 2]
test edx, edx
cmovne eax, ecx
xor ecx, ecx
mov word [eax], cx
mov ecx, 0x200
lea eax, [ebp - 0x40c]
cmp word [eax], 0
je 0x45c524
add eax, 2
sub ecx, 1
jne 0x45c516
mov eax, edi
mov esi, ecx
sub eax, ecx
neg esi
sbb esi, esi
and esi, eax
test ecx, ecx
je 0x45c57b
mov edx, edi
lea ecx, [ebp - 0x40c]
lea ecx, [ecx + esi*2]
sub edx, esi
je 0x45c56e
mov edi, str.ddraw.dll
mov eax, SysReAllocString
sub edi, ecx
nop
test eax, eax
je 0x45c569
movzx esi, word [edi + ecx]
test si, si
je 0x45c569
mov word [ecx], si
dec eax
add ecx, 2
sub edx, 1
jne 0x45c550
mov edi, 0x200
test edx, edx
lea eax, [ecx - 2]
cmovne eax, ecx
xor ecx, ecx
mov word [eax], cx
lea edx, [ebp - 0x824]
lea ecx, [ebp - 0x40c]
call fcn.0045cbc0
test eax, eax
js 0x45c623
mov ecx, dword [ebp - 0x820]
mov eax, ecx
shr eax, 0x10
cmp ax, 4
jne 0x45c5c4
push 0x40008
push 0x190
push ecx
push dword [ebp - 0x824]
call fcn.0045cc80
add esp, 0x10
test eax, eax
jns 0x45c5e7
jmp 0x45c623
cmp ax, 5
jne 0x45c623
push 0x50001
push 0x8d20190
push ecx
push dword [ebp - 0x824]
call fcn.0045cc80
add esp, 0x10
test eax, eax
js 0x45c623
mov eax, dword [ebp - 0x810]
test eax, eax
je 0x45c5f7
mov dword [eax], 8
mov eax, dword [ebp - 0x814]
test eax, eax
je 0x45c607
mov dword [eax], 0
mov eax, dword [ebp - 0x818]
test eax, eax
je 0x45c619
mov ecx, 0x20
mov word [eax], cx
mov dword [ebp - 0x81c], 1
mov edx, 0x200
lea ecx, [ebp - 0x40c]
nop
lea eax, [edx + 0x7ffffdfe]
test eax, eax
je 0x45c64e
movzx eax, word [ebx + ecx]
test ax, ax
je 0x45c64e
mov word [ecx], ax
add ecx, 2
sub edx, 1
jne 0x45c630
lea eax, [ecx - 2]
test edx, edx
cmovne eax, ecx
xor ecx, ecx
mov word [eax], cx
mov ecx, 0x200
lea eax, [ebp - 0x40c]
cmp word [eax], 0
je 0x45c674
add eax, 2
sub ecx, 1
jne 0x45c666
mov eax, edi
mov esi, ecx
sub eax, ecx
neg esi
sbb esi, esi
and esi, eax
test ecx, ecx
je 0x45c6cb
mov edx, edi
lea ecx, [ebp - 0x40c]
lea ecx, [ecx + esi*2]
sub edx, esi
je 0x45c6be
mov edi, str.d3d8.dll
mov eax, SysReAllocString
sub edi, ecx
nop
test eax, eax
je 0x45c6b9
movzx esi, word [ecx + edi]
test si, si
je 0x45c6b9
mov word [ecx], si
dec eax
add ecx, 2
sub edx, 1
jne 0x45c6a0
mov edi, 0x200
test edx, edx
lea eax, [ecx - 2]
cmovne eax, ecx
xor ecx, ecx
mov word [eax], cx
lea edx, [ebp - 0x824]
lea ecx, [ebp - 0x40c]
call fcn.0045cbc0
test eax, eax
js 0x45c7f1
mov edx, dword [ebp - 0x820]
mov ecx, edx
mov esi, dword [ebp - 0x824]
shr ecx, 0x10
cmp cx, 4
jne 0x45c715
push 0x40008
push 0x10371
push edx
push esi
call fcn.0045cc80
add esp, 0x10
test eax, eax
jns 0x45c737
jmp 0x45c77f
cmp cx, 5
jne 0x45c7f1
push 0x50001
push 0xa280371
push edx
push esi
call fcn.0045cc80
add esp, 0x10
test eax, eax
js 0x45c79d
mov eax, dword [ebp - 0x810]
test eax, eax
je 0x45c747
mov dword [eax], 8
mov eax, dword [ebp - 0x814]
test eax, eax
je 0x45c757
mov dword [eax], 1
mov eax, dword [ebp - 0x818]
test eax, eax
je 0x45c76f
mov edx, 0x20
mov word [eax], dx
mov edx, dword [ebp - 0x820]
mov dword [ebp - 0x81c], 1
cmp cx, 4
jne 0x45c797
push 0x40008
push 0x10385
push edx
push esi
call fcn.0045cc80
add esp, 0x10
test eax, eax
jns 0x45c7b5
cmp cx, 5
jne 0x45c7f1
push 0x50001
push 0xa280385
push edx
push esi
call fcn.0045cc80
add esp, 0x10
test eax, eax
js 0x45c7f1
mov eax, dword [ebp - 0x810]
test eax, eax
je 0x45c7c5
mov dword [eax], 8
mov eax, dword [ebp - 0x814]
test eax, eax
je 0x45c7d5
mov dword [eax], 1
mov eax, dword [ebp - 0x818]
test eax, eax
je 0x45c7e7
mov ecx, 0x61
mov word [eax], cx
mov dword [ebp - 0x81c], 1
mov edx, 0x200
lea ecx, [ebp - 0x40c]
nop dword [eax]
lea eax, [edx + 0x7ffffdfe]
test eax, eax
je 0x45c81e
movzx eax, word [ebx + ecx]
test ax, ax
je 0x45c81e
mov word [ecx], ax
add ecx, 2
sub edx, 1
jne 0x45c800
lea eax, [ecx - 2]
test edx, edx
cmovne eax, ecx
xor ecx, ecx
mov word [eax], cx
mov ecx, 0x200
lea eax, [ebp - 0x40c]
cmp word [eax], 0
je 0x45c844
add eax, 2
sub ecx, 1
jne 0x45c836
mov eax, edi
mov esi, ecx
sub eax, ecx
neg esi
sbb esi, esi
and esi, eax
test ecx, ecx
je 0x45c89b
mov edx, edi
lea ecx, [ebp - 0x40c]
lea ecx, [ecx + esi*2]
sub edx, esi
je 0x45c88e
mov edi, str.mpg2splt.ax
mov eax, SysReAllocString
sub edi, ecx
nop
test eax, eax
je 0x45c889
movzx esi, word [ecx + edi]
test si, si
je 0x45c889
mov word [ecx], si
dec eax
add ecx, 2
sub edx, 1
jne 0x45c870
mov edi, 0x200
test edx, edx
lea eax, [ecx - 2]
cmovne eax, ecx
xor ecx, ecx
mov word [eax], cx
lea edx, [ebp - 0x824]
lea ecx, [ebp - 0x40c]
call fcn.0045cbc0
test eax, eax
js 0x45c912
cmp dword [ebp - 0x820], 0x60003
mov dword [ebp - 0x82c], 0x10375
ja 0x45c8d6
jb 0x45c912
cmp dword [ebp - 0x824], 0x10375
ja 0x45c8d6
jb 0x45c912
mov eax, dword [ebp - 0x810]
test eax, eax
je 0x45c8e6
mov dword [eax], 8
mov eax, dword [ebp - 0x814]
test eax, eax
je 0x45c8f6
mov dword [eax], 1
mov eax, dword [ebp - 0x818]
test eax, eax
je 0x45c908
mov ecx, 0x62
mov word [eax], cx
mov dword [ebp - 0x81c], 1
mov edx, 0x200
lea ecx, [ebp - 0x40c]
nop dword [eax]
lea eax, [edx + 0x7ffffdfe]
test eax, eax
je 0x45c93e
movzx eax, word [ecx + ebx]
test ax, ax
je 0x45c93e
mov word [ecx], ax
add ecx, 2
sub edx, 1
jne 0x45c920
lea eax, [ecx - 2]
test edx, edx
cmovne eax, ecx
xor ecx, ecx
mov word [eax], cx
mov ecx, 0x200
lea eax, [ebp - 0x40c]
cmp word [eax], 0
je 0x45c964
add eax, 2
sub ecx, 1
jne 0x45c956
mov eax, edi
mov esi, ecx
sub eax, ecx
neg esi
sbb esi, esi
and esi, eax
test ecx, ecx
je 0x45c9b6
mov edx, edi
lea ecx, [ebp - 0x40c]
lea ecx, [ecx + esi*2]
sub edx, esi
je 0x45c9a9
mov edi, str.dpnet.dll
mov eax, SysReAllocString
sub edi, ecx
nop
test eax, eax
je 0x45c9a9
movzx esi, word [ecx + edi]
test si, si
je 0x45c9a9
mov word [ecx], si
dec eax
add ecx, 2
sub edx, 1
jne 0x45c990
test edx, edx
lea eax, [ecx - 2]
cmovne eax, ecx
xor ecx, ecx
mov word [eax], cx
lea edx, [ebp - 0x824]
lea ecx, [ebp - 0x40c]
call fcn.0045cbc0
test eax, eax
js 0x45ca01
mov ecx, dword [ebp - 0x820]
mov eax, ecx
shr eax, 0x10
cmp ax, 4
jne 0x45cb06
push 0x40009
push 0x86
push ecx
push dword [ebp - 0x824]
call fcn.0045cc80
add esp, 0x10
test eax, eax
jns 0x45cb31
mov edi, dword [ebp - 0x814]
mov edx, 0x200
lea ecx, [ebp - 0x40c]
lea eax, [edx + 0x7ffffdfe]
test eax, eax
je 0x45ca30
movzx eax, word [ecx + ebx]
test ax, ax
je 0x45ca30
mov word [ecx], ax
add ecx, 2
sub edx, 1
jne 0x45ca12
lea eax, [ecx - 2]
test edx, edx
cmovne eax, ecx
xor ecx, ecx
mov word [eax], cx
mov ecx, 0x200
lea eax, [ebp - 0x40c]
cmp word [eax], 0
je 0x45ca56
add eax, 2
sub ecx, 1
jne 0x45ca48
mov ebx, 0x200
mov edx, ecx
mov eax, ebx
sub eax, ecx
neg edx
sbb edx, edx
and edx, eax
test ecx, ecx
je 0x45caaa
lea ecx, [ebp - 0x40c]
lea ecx, [ecx + edx*2]
sub ebx, edx
je 0x45ca9d
mov esi, str.d3d9.dll
mov eax, SysReAllocString
sub esi, ecx
test eax, eax
je 0x45ca9d
movzx edx, word [ecx + esi]
test dx, dx
je 0x45ca9d
mov word [ecx], dx
dec eax
add ecx, 2
sub ebx, 1
jne 0x45ca84
test ebx, ebx
lea eax, [ecx - 2]
cmovne eax, ecx
xor ecx, ecx
mov word [eax], cx
lea edx, [ebp - 0x824]
lea ecx, [ebp - 0x40c]
call fcn.0045cbc0
test eax, eax
js 0x45cb72
mov eax, dword [ebp - 0x810]
test eax, eax
je 0x45cad3
mov dword [eax], 9
test edi, edi
je 0x45cadd
mov dword [edi], 0
mov eax, dword [ebp - 0x818]
test eax, eax
je 0x45cba7
mov ecx, 0x20
mov word [eax], cx
xor eax, eax
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 8]
xor ecx, ebp
call fcn.005af765
mov esp, ebp
pop ebp
ret
cmp ax, 5
jne 0x45ca01
push 0x50002
push 0xe5d0086
push ecx
push dword [ebp - 0x824]
call fcn.0045cc80
add esp, 0x10
test eax, eax
js 0x45ca01
mov eax, dword [ebp - 0x810]
test eax, eax
je 0x45cb41
mov dword [eax], 8
mov edi, dword [ebp - 0x814]
test edi, edi
je 0x45cb51
mov dword [edi], 2
mov eax, dword [ebp - 0x818]
test eax, eax
je 0x45cb63
mov ecx, 0x20
mov word [eax], cx
mov dword [ebp - 0x81c], 1
jmp 0x45ca07
cmp dword [ebp - 0x81c], 0
jne 0x45cba7
mov ebx, dword [ebp - 0x810]
mov ecx, 0x20
mov esi, dword [ebp - 0x818]
test ebx, ebx
je 0x45cb96
mov dword [ebx], 0
test edi, edi
je 0x45cba0
mov dword [edi], 0
test esi, esi
je 0x45cba7
mov word [esi], cx
mov ecx, dword [ebp - 8]
xor eax, eax
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.005af765
mov esp, ebp
pop ebp
ret