Function at 0x497020
Capabilities:
Check if file exists
Create directory

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x4d074a
mov eax, dword fs:[0]
push eax
sub esp, 0x284
mov eax, dword [0x4fa0a8]
xor eax, ebp
mov dword [ebp - 0x10], eax
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov eax, dword [ebp + 0xc]
mov edi, dword [ebp + 8]
push 1
mov dword [ebp - 0x23c], eax
call fcn.0041b140
add esp, 4
call fcn.004704e0
push 0
test eax, eax
je 0x497087
push 0x4d2b00
push str.CADWindows7XP
push 0
call dword [sym.imp.USER32.dll_MessageBoxW]
xor eax, eax
jmp 0x497da7
push edi
lea ecx, [ebp - 0x268]
call fcn.0048e4f0
push ecx
mov esi, esp
mov dword [ebp - 4], 0
mov dword [ebp - 0x22c], esi
call fcn.00404d00
mov ecx, eax
test ecx, ecx
je 0x497dc2
mov eax, dword [ecx]
mov eax, dword [eax + 0xc]
call eax
add eax, 0x10
mov dword [esi], eax
push str._pid
mov ecx, esi
mov byte [ebp - 4], 1
call fcn.00404660
test al, al
jne 0x4970e0
push 4
push str._pid
mov ecx, esi
call fcn.00404930
lea ecx, [ebp - 0x268]
mov byte [ebp - 4], 0
call fcn.0048f720
test eax, eax
je 0x497143
push ecx
mov ecx, esp
push str._pid
call fcn.00404a30
lea eax, [ebp - 0x228]
push eax
lea ecx, [ebp - 0x268]
call fcn.0048f7b0
push eax
mov ecx, 0x4fdba0
mov byte [ebp - 4], 2
call fcn.00403150
mov edx, dword [ebp - 0x228]
or eax, 0xffffffff
mov byte [ebp - 4], 0
add edx, 0xfffffff0
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x497143
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
push 0x208
lea eax, [ebp - 0x218]
push 0
push eax
call fcn.0049c3c0
add esp, 0xc
lea eax, [ebp - 0x218]
push 0x104
push eax
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
lea eax, [ebp - 0x218]
push eax
call dword [sym.imp.SHLWAPI.dll_PathFindFileNameW]
mov esi, eax
call fcn.00404d00
test eax, eax
je 0x497dc2
mov edx, dword [eax]
mov ecx, eax
mov edx, dword [edx + 0xc]
call edx
add eax, 0x10
mov dword [ebp - 0x220], eax
push esi
lea ecx, [ebp - 0x220]
mov byte [ebp - 4], 3
call fcn.00404660
test al, al
jne 0x4971dc
test esi, esi
jne 0x4971b7
xor ecx, ecx
jmp 0x4971cf
mov ecx, esi
lea edx, [ecx + 2]
nop dword [eax]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x4971c0
sub ecx, edx
sar ecx, 1
push ecx
push esi
lea ecx, [ebp - 0x220]
call fcn.00404930
mov eax, dword [ebp - 0x220]
mov byte [ebp - 4], 4
cmp dword [eax - 4], 1
jle 0x497200
push dword [eax - 0xc]
lea ecx, [ebp - 0x220]
call fcn.00404790
mov eax, dword [ebp - 0x220]
push eax
call dword [sym.imp.SHLWAPI.dll_PathRemoveExtensionW]
mov eax, dword [ebp - 0x220]
push dword [eax - 8]
push eax
call fcn.004a42a5
mov edx, eax
add esp, 8
test edx, edx
js 0x497dcc
mov ecx, dword [ebp - 0x220]
cmp edx, dword [ecx - 8]
jg 0x497dcc
mov dword [ecx - 0xc], edx
xor ecx, ecx
mov eax, dword [ebp - 0x220]
mov dword [ebp - 0x228], ecx
mov word [eax + edx*2], cx
mov dword [ebp - 0x24c], ecx
mov dword [ebp - 0x248], ecx
mov dword [ebp - 0x244], ecx
mov byte [ebp - 4], 5
call fcn.00404d00
mov ecx, eax
test ecx, ecx
je 0x497dc2
mov eax, dword [ecx]
mov eax, dword [eax + 0xc]
call eax
add eax, 0x10
mov dword [ebp - 0x21c], eax
push 0x4e395c
lea ecx, [ebp - 0x21c]
mov byte [ebp - 4], 6
call fcn.00404660
test al, al
jne 0x4972a6
push 1
push 0x4e395c
lea ecx, [ebp - 0x21c]
call fcn.00404930
lea eax, [ebp - 0x24c]
mov byte [ebp - 4], 7
push eax
lea eax, [ebp - 0x21c]
push eax
lea eax, [ebp - 0x220]
push eax
call fcn.00472df0
mov edx, dword [ebp - 0x21c]
add esp, 0xc
mov byte [ebp - 4], 5
add edx, 0xfffffff0
or eax, 0xffffffff
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x4972e9
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov eax, dword [0x4fdba0]
cmp dword [eax - 0xc], 0
jne 0x497327
mov edx, dword [ebp - 0x248]
mov esi, dword [ebp - 0x24c]
sub edx, esi
sar edx, 2
cmp edx, 3
jb 0x49731d
lea eax, [esi + 8]
mov ecx, 0x4fdba0
push eax
call fcn.00403150
mov eax, dword [0x4fdba0]
cmp dword [eax - 0xc], 0
je 0x49741b
lea eax, [ebp - 0x21c]
push eax
call fcn.00473f10
add esp, 4
push dword [ebp - 0x21c]
mov byte [ebp - 4], 8
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
jne 0x497371
push eax
push 0x80
push 2
push eax
push eax
push 0xc0000000
push dword [ebp - 0x21c]
call dword [sym.imp.KERNEL32.dll_CreateFileW]
cmp eax, 0xffffffff
je 0x497371
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
lea eax, [ebp - 0x230]
push eax
call fcn.0046e660
add esp, 4
mov ecx, dword [eax]
lea edx, [ebp - 0x234]
push edx
mov byte [ebp - 4], 9
mov eax, dword [ecx]
mov eax, dword [eax + 0xf0]
call eax
push dword [ebp - 0x21c]
push dword [0x4fdba0]
push str.DPid
push dword [eax]
call dword [sym.imp.KERNEL32.dll_WritePrivateProfileStringW]
mov edx, dword [ebp - 0x234]
or eax, 0xffffffff
add edx, 0xfffffff0
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x4973ce
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov esi, dword [ebp - 0x22c]
test esi, esi
je 0x4973f9
or eax, 0xffffffff
lock xadd dword [esi + 4], eax
jne 0x4973f9
mov eax, dword [esi]
mov ecx, esi
call dword [eax]
or eax, 0xffffffff
lock xadd dword [esi + 8], eax
jne 0x4973f9
mov eax, dword [esi]
mov ecx, esi
call dword [eax + 4]
mov edx, dword [ebp - 0x21c]
or eax, 0xffffffff
mov byte [ebp - 4], 5
add edx, 0xfffffff0
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x49741b
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov eax, dword [ebp - 0x248]
mov esi, dword [ebp - 0x24c]
sub eax, esi
sar eax, 2
cmp eax, 4
jb 0x4974a7
mov eax, dword [esi + 0xc]
sub eax, 0x10
push eax
call fcn.00404440
add esp, 4
cmp dword [eax + 4], 0
lea esi, [eax + 0x10]
jl 0x49748f
push str.SMDB
push esi
call fcn.0049c59c
add esp, 8
test eax, eax
je 0x497464
sub eax, esi
sar eax, 1
cmp eax, 0xffffffff
jne 0x497485
cmp dword [esi - 0xc], 0
jl 0x49748f
push 0x4e4e08
push esi
call fcn.0049c59c
add esp, 8
test eax, eax
je 0x49748f
sub eax, esi
sar eax, 1
cmp eax, 0xffffffff
je 0x49748f
mov dword [ebp - 0x228], 1
add esi, 0xfffffff0
or eax, 0xffffffff
lock xadd dword [esi + 0xc], eax
dec eax
test eax, eax
jg 0x4974a7
mov ecx, dword [esi]
push esi
mov eax, dword [ecx]
call dword [eax + 4]
call fcn.00404d00
mov ecx, eax
test ecx, ecx
je 0x497dc2
mov eax, dword [ecx]
mov eax, dword [eax + 0xc]
call eax
add eax, 0x10
mov dword [ebp - 0x240], eax
push edi
lea ecx, [ebp - 0x240]
mov byte [ebp - 4], 0xa
call fcn.00404660
test al, al
jne 0x497503
test edi, edi
jne 0x4974e2
xor ecx, ecx
jmp 0x4974f6
mov ecx, edi
lea edx, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x4974e7
sub ecx, edx
sar ecx, 1
push ecx
push edi
lea ecx, [ebp - 0x240]
call fcn.00404930
mov edi, dword [ebp - 0x240]
mov byte [ebp - 4], 0xb
cmp dword [edi - 0xc], 0
jl 0x497556
push 0x4d2b80
push edi
call fcn.0049c59c
add esp, 8
test eax, eax
je 0x49752e
sub eax, edi
sar eax, 1
cmp eax, 0xffffffff
jne 0x49754f
cmp dword [edi - 0xc], 0
jl 0x497556
push 0x4d2b88
push edi
call fcn.0049c59c
add esp, 8
test eax, eax
je 0x497556
sub eax, edi
sar eax, 1
cmp eax, 0xffffffff
je 0x497556
mov eax, 1
jmp 0x497558
xor eax, eax
mov dword [0x4fdb9c], eax
cmp dword [edi - 0xc], 0
jl 0x497932
push 0x4d2b90
push edi
call fcn.0049c59c
add esp, 8
test eax, eax
je 0x497582
sub eax, edi
sar eax, 1
cmp eax, 0xffffffff
jne 0x4975af
cmp dword [edi - 0xc], 0
jl 0x497932
push 0x4d2b98
push edi
call fcn.0049c59c
add esp, 8
test eax, eax
je 0x4978e8
sub eax, edi
sar eax, 1
cmp eax, 0xffffffff
je 0x4978e8
push ecx
mov esi, esp
mov dword [ebp - 0x22c], esi
call fcn.00404d00
mov ecx, eax
test ecx, ecx
je 0x497dc2
mov eax, dword [ecx]
mov eax, dword [eax + 0xc]
call eax
add eax, 0x10
mov dword [esi], eax
push 0x4d2b98
mov ecx, esi
mov byte [ebp - 4], 0xc
call fcn.00404660
test al, al
jne 0x4975f5
push 2
push 0x4d2b98
mov ecx, esi
call fcn.00404930
lea eax, [ebp - 0x21c]
mov byte [ebp - 4], 0xb
push eax
lea ecx, [ebp - 0x268]
call fcn.0048f7b0
mov eax, dword [ebp - 0x21c]
mov byte [ebp - 4], 0xd
cmp dword [eax - 0xc], 0
jne 0x49766c
push ecx
mov ecx, esp
push 0x4d2b90
call fcn.00404a30
lea eax, [ebp - 0x234]
push eax
lea ecx, [ebp - 0x268]
call fcn.0048f7b0
push eax
lea ecx, [ebp - 0x21c]
mov byte [ebp - 4], 0xe
call fcn.00403150
mov edx, dword [ebp - 0x234]
or eax, 0xffffffff
mov byte [ebp - 4], 0xd
add edx, 0xfffffff0
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x49766c
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
push dword [ebp - 0x21c]
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
jne 0x49788b
xor esi, esi
mov eax, dword [ebp - 0x21c]
test esi, esi
js 0x4976d2
cmp esi, dword [eax - 0xc]
jg 0x4976d2
lea ecx, [esi + esi]
add eax, ecx
mov dword [ebp - 0x224], ecx
push 0x4e3cfc
push eax
call fcn.0049c59c
mov edx, dword [ebp - 0x224]
mov ecx, eax
mov eax, dword [ebp - 0x21c]
add esp, 8
test ecx, ecx
jne 0x4976c1
mov ecx, dword [eax - 0xc]
jmp 0x4976e0
sub ecx, eax
sar ecx, 1
mov dword [ebp - 0x234], ecx
cmp ecx, 0xffffffff
jne 0x49771b
jmp 0x4976d5
lea edx, [esi + esi]
mov ecx, dword [eax - 0xc]
test esi, esi
js 0x497882
cmp esi, ecx
jg 0x497882
add eax, edx
push 0x4e6f48
push eax
call fcn.0049c59c
mov ecx, eax
add esp, 8
test ecx, ecx
je 0x49787c
mov eax, dword [ebp - 0x21c]
sub ecx, eax
sar ecx, 1
mov dword [ebp - 0x234], ecx
cmp ecx, 0xffffffff
je 0x497882
xor esi, esi
test ecx, ecx
cmovns esi, ecx
mov dword [ebp - 0x22c], esi
cmp esi, dword [eax - 0xc]
jl 0x497741
add eax, 0xfffffff0
push eax
call fcn.00404440
add esp, 4
lea esi, [eax + 0x10]
jmp 0x497819
mov ecx, dword [eax - 0x10]
test ecx, ecx
je 0x497769
mov eax, dword [ecx]
mov eax, dword [eax + 0x10]
call eax
mov ecx, eax
test ecx, ecx
je 0x497769
mov eax, dword [ebp - 0x21c]
mov dword [ebp - 0x224], eax
mov dword [ebp - 0x250], eax
jmp 0x497793
call fcn.00404d00
mov ecx, eax
mov edx, dword [eax]
mov eax, dword [edx + 0x10]
call eax
mov ecx, eax
mov eax, dword [ebp - 0x21c]
mov dword [ebp - 0x224], eax
mov dword [ebp - 0x250], eax
test ecx, ecx
je 0x497dc2
test eax, eax
jne 0x49779f
test esi, esi
jne 0x497dcc
mov eax, dword [ecx]
push 2
push esi
mov eax, dword [eax]
call eax
test eax, eax
je 0x497dd6
lea esi, [eax + 0x10]
mov eax, dword [ebp - 0x22c]
test eax, eax
js 0x497dcc
cmp eax, dword [esi - 8]
jg 0x497dcc
lea ecx, [eax + eax]
mov dword [esi - 0xc], eax
xor eax, eax
mov word [ecx + esi], ax
test ecx, ecx
je 0x497819
test esi, esi
je 0x497809
mov eax, dword [ebp - 0x224]
push ecx
test eax, eax
je 0x4977f5
push eax
push esi
call fcn.0049be40
add esp, 0xc
jmp 0x497819
push 0
push esi
call fcn.0049c3c0
add esp, 0xc
cmp dword [ebp - 0x250], 0
jne 0x497819
call fcn.0049f1b9
mov dword [eax], 0x16
call fcn.0049f0df
push esi
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
jne 0x49782c
push eax
push esi
call dword [sym.imp.KERNEL32.dll_CreateDirectoryW]
mov ecx, dword [ebp - 0x234]
lea edx, [esi - 0x10]
mov eax, dword [ebp - 0x21c]
inc ecx
mov dword [ebp - 0x234], ecx
cmp ecx, dword [eax - 0xc]
jge 0x497867
or eax, 0xffffffff
lock xadd dword [edx + 0xc], eax
dec eax
mov esi, ecx
test eax, eax
jg 0x497682
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
jmp 0x497682
or eax, 0xffffffff
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x49787c
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov eax, dword [ebp - 0x21c]
push 0
push eax
call dword [sym.imp.KERNEL32.dll_CreateDirectoryW]
push ecx
mov esi, esp
mov dword [ebp - 0x22c], esp
mov dword [ebp - 0x234], esi
mov eax, dword [ebp - 0x21c]
add eax, 0xfffffff0
push eax
call fcn.00404440
add eax, 0x10
add esp, 4
mov dword [esi], eax
mov byte [ebp - 4], 0xf
call fcn.004903f0
mov byte [ebp - 4], 0xd
lea ecx, [eax + 4]
call fcn.00456320
mov edx, dword [ebp - 0x21c]
or eax, 0xffffffff
mov byte [ebp - 4], 0xb
add edx, 0xfffffff0
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x4978e8
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
cmp dword [edi - 0xc], 0
jl 0x497932
push 0x4d2ba0
push edi
call fcn.0049c59c
add esp, 8
test eax, eax
je 0x49790d
sub eax, edi
sar eax, 1
cmp eax, 0xffffffff
jne 0x497aea
cmp dword [edi - 0xc], 0
jl 0x497932
push 0x4d2ba8
push edi
call fcn.0049c59c
add esp, 8
test eax, eax
je 0x497932
sub eax, edi
sar eax, 1
cmp eax, 0xffffffff
jne 0x497aea
cmp dword [ebp - 0x228], 0
jne 0x497aea
cmp dword [0x4fdb9c], 0
mov dword [0x4fdb98], 0
jne 0x49795c
call fcn.0046eeb0
mov dword [0x4fdb9c], eax
push 0x4df010
push str.start
push 0x4d2498
call fcn.00471760
add esp, 0xc
cmp dword [0x4fdb8c], 0
jne 0x4979ab
push 0x128
call fcn.0049a537
add esp, 4
mov dword [ebp - 0x22c], eax
mov byte [ebp - 4], 0x12
test eax, eax
je 0x4979a0
mov ecx, eax
call fcn.004912e0
jmp 0x4979a2
xor eax, eax
mov byte [ebp - 4], 0xb
mov dword [0x4fdb8c], eax
call fcn.004918c0
call fcn.00470540
mov edi, dword [ebp - 0x23c]
neg eax
sbb eax, eax
inc eax
mov dword [ebp - 0x22c], eax
lea eax, [edi + 0x1c]
mov dword [ebp - 0x21c], eax
mov edx, 1
xor esi, esi
mov dword [ebp - 0x224], edx
nop dword [eax]
test edx, edx
je 0x497a28
push 0
push 0
push 0
push 0
push eax
call dword [sym.imp.USER32.dll_PeekMessageW]
test eax, eax
jne 0x497a1c
mov ecx, dword [ebp - 0x23c]
push esi
mov eax, dword [ecx]
mov eax, dword [eax + 8]
call eax
inc esi
test eax, eax
mov eax, dword [ebp - 0x21c]
jne 0x4979e4
mov dword [ebp - 0x224], 0
jmp 0x497a22
mov eax, dword [ebp - 0x21c]
mov edi, dword [ebp - 0x23c]
push 0
push 0
push 0
push eax
call dword [sym.imp.USER32.dll_GetMessageW]
mov edx, dword [ebp - 0x224]
mov ecx, eax
mov eax, dword [ebp - 0x21c]
cmp ecx, 0xffffffff
je 0x4979e0
test ecx, ecx
je 0x497ad6
mov eax, dword [edi]
mov ecx, edi
push dword [ebp - 0x21c]
mov eax, dword [eax + 4]
call eax
test eax, eax
jne 0x497aae
cmp dword [ebp - 0x22c], eax
je 0x497a96
cmp dword [edi + 0x20], 0x20a
jne 0x497a96
lea eax, [ebp - 0x238]
push eax
call dword [sym.imp.USER32.dll_GetCursorPos]
push dword [ebp - 0x234]
push dword [ebp - 0x238]
call dword [sym.imp.USER32.dll_WindowFromPoint]
mov dword [edi + 0x1c], eax
push dword [ebp - 0x21c]
call dword [sym.imp.USER32.dll_TranslateMessage]
push dword [ebp - 0x21c]
call dword [sym.imp.USER32.dll_DispatchMessageW]
mov eax, dword [edi]
mov ecx, edi
push dword [ebp - 0x21c]
mov eax, dword [eax + 0xc]
call eax
mov edx, dword [ebp - 0x224]
test eax, eax
mov eax, dword [ebp - 0x21c]
je 0x4979e0
jmp 0x4979cf
mov ecx, dword [edi + 0x24]
mov edi, dword [ebp - 0x240]
mov dword [ebp - 0x228], ecx
jmp 0x497c38
mov dword [0x4fdb98], 1
cmp dword [edi - 0xc], 0
jl 0x497b42
push 0x4d2bb0
push edi
call fcn.0049c59c
add esp, 8
test eax, eax
je 0x497b15
sub eax, edi
sar eax, 1
cmp eax, 0xffffffff
jne 0x497b36
cmp dword [edi - 0xc], 0
jl 0x497b42
push 0x4d2bb8
push edi
call fcn.0049c59c
add esp, 8
test eax, eax
je 0x497b42
sub eax, edi
sar eax, 1
cmp eax, 0xffffffff
je 0x497b42
mov dword [ebp - 0x228], 1
jmp 0x497b4c
mov dword [ebp - 0x228], 0
push 0x4df010
push str.start
push 0x4d2498
call fcn.00471760
movaps xmm0, xmmword [0x4d2c20]
sub esp, 0x1c
movaps xmm1, xmmword [0x4d2c10]
mov eax, esp
mov dword [ebp - 0x270], 0
mov dword [ebp - 0x26c], 0
push 0
movups xmmword [eax], xmm0
push ecx
movq xmm0, qword [ebp - 0x270]
mov esi, esp
movups xmmword [eax + 0x10], xmm1
mov dword [ebp - 0x234], esi
movq qword [eax + 0x20], xmm0
mov eax, dword [0x4fdba0]
add eax, 0xfffffff0
mov dword [ebp - 0x22c], esp
push eax
call fcn.00404440
add eax, 0x10
add esp, 4
mov dword [esi], eax
mov eax, dword [0x4fdb88]
mov byte [ebp - 4], 0x10
test eax, eax
jne 0x497bfe
push 0x180
call fcn.0049a537
add esp, 4
mov dword [ebp - 0x234], eax
mov byte [ebp - 4], 0x11
test eax, eax
je 0x497bf3
mov ecx, eax
call fcn.0044f8e0
jmp 0x497bf5
xor eax, eax
mov byte [ebp - 4], 0x10
mov dword [0x4fdb88], eax
push dword [0x4fdb9c]
mov ecx, eax
push dword [0x4fdb98]
mov byte [ebp - 4], 0xb
call fcn.0044fd60
test eax, eax
js 0x497c2e
cmp dword [ebp - 0x228], 0
je 0x497c2e
call fcn.004903f0
mov ecx, eax
call fcn.00451410
mov dword [ebp - 0x228], 0
mov byte [ebp - 4], 5
add edi, 0xfffffff0
or eax, 0xffffffff
lock xadd dword [edi + 0xc], eax
dec eax
test eax, eax
jg 0x497c54
mov ecx, dword [edi]
push edi
mov eax, dword [ecx]
call dword [eax + 4]
mov esi, dword [ebp - 0x24c]
mov byte [ebp - 4], 4
test esi, esi
je 0x497cef
mov edi, dword [ebp - 0x248]
cmp esi, edi
je 0x497c97
mov edx, dword [esi]
or eax, 0xffffffff
sub edx, 0x10
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x497c8a
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
add esi, 4
cmp esi, edi
jne 0x497c70
mov esi, dword [ebp - 0x24c]
mov eax, dword [ebp - 0x244]
sub eax, esi
sar eax, 2
lea ecx, [eax*4]
mov eax, esi
cmp ecx, 0x1000
jb 0x497cc7
mov esi, dword [esi - 4]
add ecx, 0x23
sub eax, esi
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x497ddb
push ecx
push esi
call fcn.0049a567
add esp, 8
mov dword [ebp - 0x24c], 0
mov dword [ebp - 0x248], 0
mov dword [ebp - 0x244], 0
mov edx, dword [ebp - 0x220]
or eax, 0xffffffff
mov byte [ebp - 4], 0
add edx, 0xfffffff0
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x497d11
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov edi, dword [ebp - 0x264]
mov dword [ebp - 4], 0xffffffff
test edi, edi
je 0x497d83
mov eax, dword [ebp - 0x260]
xor esi, esi
mov dword [ebp - 0x22c], eax
test eax, eax
je 0x497d7a
mov edx, dword [edi + esi*8 + 4]
or eax, 0xffffffff
sub edx, 0x10
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x497d50
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov edx, dword [edi + esi*8]
or eax, 0xffffffff
sub edx, 0x10
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x497d6b
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
inc esi
cmp esi, dword [ebp - 0x22c]
jb 0x497d34
mov edi, dword [ebp - 0x264]
push edi
call fcn.0049f1cc
add esp, 4
mov eax, dword [ebp - 0x268]
or ecx, 0xffffffff
add eax, 0xfffffff0
lock xadd dword [eax + 0xc], ecx
dec ecx
test ecx, ecx
jg 0x497da1
mov ecx, dword [eax]
push eax
mov edx, dword [ecx]
call dword [edx + 4]
mov eax, dword [ebp - 0x228]
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.0049a9dd
mov esp, ebp
pop ebp
ret
push 0x80004005
call fcn.00404ae0
push 0x80070057
call fcn.00404ae0
call fcn.00403ae0
call fcn.0049f0ef
int3