Function at 0x587300
Capabilities:
Query environment variable

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x5d37a6
mov eax, dword fs:[0]
push eax
sub esp, 0x28
push ebx
push esi
push edi
mov eax, dword [0x638fe4]
xor eax, ebp
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov ebx, ecx
mov dword [ebp - 0x10], ebx
call fcn.00418413
mov ecx, eax
test ecx, ecx
jne 0x587342
push 0x80004005
call fcn.00402650
mov eax, dword [ecx]
mov edx, dword [eax + 0xc]
cmp eax, vtable.ATL::CAtlStringMgr.0
jne 0x587357
lock inc dword [ecx + 0x14]
lea eax, [ecx + 8]
jmp 0x587359
call edx
lea esi, [eax + 0x10]
mov dword [ebp - 0x28], esi
mov dword [ebp - 4], 0
mov ecx, 1
mov eax, dword [esi - 8]
sub ecx, dword [esi - 4]
sub eax, 0x104
or eax, ecx
jge 0x58738a
push 0x104
lea ecx, [ebp - 0x28]
call fcn.00402cf0
mov esi, dword [ebp - 0x28]
push 0x104
push esi
push str._APPDATA_CanonIJ_Scan_Utility
call dword [sym.imp.KERNEL32.dll_ExpandEnvironmentStringsW]
push dword [esi - 8]
push esi
call fcn.0054c667
add esp, 8
test eax, eax
js 0x58785f
cmp eax, dword [esi - 8]
jg 0x58785f
xor ecx, ecx
mov dword [esi - 0xc], eax
push ecx
mov word [esi + eax*2], cx
mov edi, esp
lea eax, [esi - 0x10]
mov dword [ebp - 0x34], edi
push eax
mov dword [ebp - 0x34], eax
call fcn.004035b0
add esp, 4
add eax, 0x10
mov dword [edi], eax
call fcn.005add70
mov ecx, dword [0x643be0]
add esp, 4
test ecx, ecx
je 0x58740f
mov eax, dword [esi - 0xc]
inc eax
push eax
xor eax, eax
cmp ebx, 0x9fbf1
push esi
setne al
dec eax
and eax, 4
push 0x20007
push dword [eax + 0x644028]
call ecx
call fcn.00418413
mov ecx, eax
test ecx, ecx
jne 0x587424
push 0x80004005
call fcn.00402650
mov eax, dword [ecx]
mov edx, dword [eax + 0xc]
cmp eax, vtable.ATL::CAtlStringMgr.0
jne 0x587439
lock inc dword [ecx + 0x14]
lea eax, [ecx + 8]
jmp 0x58743b
call edx
lea edi, [eax + 0x10]
mov dword [ebp - 0x14], edi
mov byte [ebp - 4], 1
mov esi, 1
mov eax, dword [edi - 8]
mov ecx, esi
sub ecx, dword [edi - 4]
sub eax, 0x104
or eax, ecx
jge 0x58746b
push 0x104
lea ecx, [ebp - 0x14]
call fcn.00402cf0
mov edi, dword [ebp - 0x14]
call fcn.004196a0
push 0x104
push edi
mov eax, dword [eax + 8]
push eax
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
push dword [edi - 8]
push edi
call fcn.0054c667
add esp, 8
test eax, eax
js 0x58785f
cmp eax, dword [edi - 8]
jg 0x58785f
mov dword [edi - 0xc], eax
xor ecx, ecx
mov word [edi + eax*2], cx
mov ecx, esi
mov eax, dword [edi - 8]
sub ecx, dword [edi - 4]
sub eax, 0x104
or eax, ecx
jge 0x5874c7
push 0x104
lea ecx, [ebp - 0x14]
call fcn.00402cf0
mov edi, dword [ebp - 0x14]
push edi
call dword [sym.imp.SHLWAPI.dll_PathRemoveFileSpecW]
push dword [edi - 8]
push edi
call fcn.0054c667
add esp, 8
test eax, eax
js 0x58785f
cmp eax, dword [edi - 8]
jg 0x58785f
mov dword [edi - 0xc], eax
xor ecx, ecx
mov word [edi + eax*2], cx
mov ecx, esi
mov eax, dword [edi - 8]
sub ecx, dword [edi - 4]
sub eax, 0x104
or eax, ecx
jge 0x587515
push 0x104
lea ecx, [ebp - 0x14]
call fcn.00402cf0
mov edi, dword [ebp - 0x14]
push str.SUALMLIB.dll
push edi
call dword [sym.imp.SHLWAPI.dll_PathAppendW]
push dword [edi - 8]
push edi
call fcn.0054c667
add esp, 8
test eax, eax
js 0x58785f
cmp eax, dword [edi - 8]
jg 0x58785f
xor ecx, ecx
mov dword [edi - 0xc], eax
mov word [edi + eax*2], cx
mov ecx, dword [0x643be0]
test ecx, ecx
je 0x587573
mov eax, dword [edi - 0xc]
inc eax
push eax
xor eax, eax
cmp ebx, 0x9fbf1
push edi
setne al
dec eax
and eax, 4
push 0x2000e
push dword [eax + 0x644028]
call ecx
call fcn.00418413
mov ecx, eax
test ecx, ecx
jne 0x587588
push 0x80004005
call fcn.00402650
mov eax, dword [ecx]
mov edx, dword [eax + 0xc]
cmp eax, vtable.ATL::CAtlStringMgr.0
jne 0x58759d
lock inc dword [ecx + 0x14]
lea eax, [ecx + 8]
jmp 0x58759f
call edx
lea esi, [eax + 0x10]
mov dword [ebp - 0x1c], esi
mov byte [ebp - 4], 2
mov ecx, 1
mov eax, dword [esi - 8]
sub ecx, dword [esi - 4]
sub eax, 0x104
or eax, ecx
jge 0x5875cd
push 0x104
lea ecx, [ebp - 0x1c]
call fcn.00402cf0
mov esi, dword [ebp - 0x1c]
call fcn.004196a0
push 0x104
push esi
mov eax, dword [eax + 8]
push eax
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
push dword [esi - 8]
push esi
call fcn.0054c667
add esp, 8
test eax, eax
js 0x58785f
cmp eax, dword [esi - 8]
jg 0x58785f
mov dword [esi - 0xc], eax
xor ecx, ecx
mov word [esi + eax*2], cx
mov ecx, 1
mov eax, dword [esi - 8]
sub ecx, dword [esi - 4]
sub eax, 0x104
or eax, ecx
jge 0x58762c
push 0x104
lea ecx, [ebp - 0x1c]
call fcn.00402cf0
mov esi, dword [ebp - 0x1c]
push esi
call dword [sym.imp.SHLWAPI.dll_PathRemoveFileSpecW]
push dword [esi - 8]
push esi
call fcn.0054c667
add esp, 8
test eax, eax
js 0x58785f
cmp eax, dword [esi - 8]
jg 0x58785f
xor ecx, ecx
mov dword [esi - 0xc], eax
mov word [esi + eax*2], cx
lea ecx, [ebp - 0x24]
push str.OCRDicV3
call fcn.00403280
mov byte [ebp - 4], 3
mov ecx, 1
mov edx, dword [ebp - 0x24]
mov dword [ebp - 0x20], edx
mov eax, dword [edx - 8]
sub ecx, dword [edx - 4]
sub eax, 0x104
or eax, ecx
jge 0x587697
push 0x104
lea ecx, [ebp - 0x24]
call fcn.00402cf0
mov eax, dword [ebp - 0x24]
mov dword [ebp - 0x20], eax
mov eax, dword [esi - 8]
mov ecx, 1
sub ecx, dword [esi - 4]
sub eax, 0x104
or eax, ecx
jge 0x5876bb
push 0x104
lea ecx, [ebp - 0x1c]
call fcn.00402cf0
mov esi, dword [ebp - 0x1c]
push dword [ebp - 0x20]
push esi
call dword [sym.imp.SHLWAPI.dll_PathAppendW]
push dword [esi - 8]
push esi
call fcn.0054c667
add esp, 8
test eax, eax
js 0x58785f
cmp eax, dword [esi - 8]
jg 0x58785f
xor ecx, ecx
mov dword [esi - 0xc], eax
mov word [esi + eax*2], cx
mov eax, dword [esi - 0xc]
test eax, eax
je 0x58771b
mov ecx, dword [0x643be0]
test ecx, ecx
je 0x58771b
inc eax
push eax
xor eax, eax
cmp ebx, 0x9fbf1
push esi
setne al
dec eax
and eax, 4
push 0x20002
push dword [eax + 0x644028]
call ecx
push 0
push 0
mov edx, str.cocr.dll
mov ecx, esi
call fcn.005adbe0
mov ecx, dword [0x643bf4]
add esp, 8
test al, al
je 0x587869
test ecx, ecx
je 0x587761
xor eax, eax
cmp ebx, 0x9fbf1
push 0x12b6
setne al
dec eax
and eax, 4
push 0x1000c
push dword [eax + 0x644028]
call ecx
lea eax, [esi - 0x10]
push eax
call fcn.004035b0
add esp, 4
lea ebx, [eax + 0x10]
mov dword [ebp - 0x20], ebx
mov byte [ebp - 4], 4
mov ecx, 1
mov eax, dword [ebx - 8]
sub ecx, dword [ebx - 4]
sub eax, 0x104
or eax, ecx
jge 0x58779b
push 0x104
lea ecx, [ebp - 0x20]
call fcn.00402cf0
mov ebx, dword [ebp - 0x20]
push str.cocr.dll
push ebx
call dword [sym.imp.SHLWAPI.dll_PathAppendW]
push dword [ebx - 8]
push ebx
call fcn.0054c667
add esp, 8
test eax, eax
js 0x58785f
cmp eax, dword [ebx - 8]
jg 0x58785f
xor ecx, ecx
mov dword [ebx - 0xc], eax
mov word [ebx + eax*2], cx
lea ecx, [ebp - 0x20]
call fcn.005aed30
mov ecx, dword [0x643bf4]
mov ebx, dword [ebp - 0x10]
test ecx, ecx
je 0x5877ff
push eax
xor eax, eax
cmp ebx, 0x9fbf1
push 0x10011
setne al
dec eax
and eax, 4
push dword [eax + 0x644028]
call ecx
mov byte [ebp - 4], 3
or eax, 0xffffffff
mov ecx, dword [ebp - 0x20]
add ecx, 0xfffffff0
lock xadd dword [ecx + 0xc], eax
dec eax
test eax, eax
jg 0x5878ad
mov edx, dword [ecx]
push ecx
mov eax, dword [edx]
mov edi, dword [eax + 4]
mov dword [ebp - 0x20], edi
mov edi, dword [ebp - 0x14]
cmp eax, vtable.ATL::CAtlStringMgr.0
jne 0x587858
mov edx, dword [edx + 4]
mov eax, dword [edx]
mov ebx, dword [eax + 4]
mov dword [ebp - 0x20], ebx
mov ebx, dword [ebp - 0x10]
cmp eax, vtable.ATL::CWin32Heap.0
jne 0x587851
push 0
push dword [edx + 4]
call dword [sym.imp.KERNEL32.dll_HeapFree]
jmp 0x5878ad
mov ecx, edx
call dword [ebp - 0x20]
jmp 0x5878ad
mov ecx, edx
call dword [ebp - 0x20]
jmp 0x5878ad
push 0x80070057
call fcn.00402650
test ecx, ecx
je 0x5878ad
xor eax, eax
cmp ebx, 0x9fbf1
push 0x12b7
setne al
dec eax
and eax, 4
push 0x1000c
mov dword [ebp - 0x20], eax
push dword [eax + 0x644028]
call ecx
mov ecx, dword [0x643bf4]
test ecx, ecx
je 0x5878ad
mov eax, dword [ebp - 0x20]
push 0
push 0x10011
push dword [eax + 0x644028]
call ecx
push str.rdd20.dll
push str.basicJ.ocr
mov edx, str.cnreeaoc.dll
mov ecx, esi
call fcn.005adbe0
mov ecx, dword [0x643bf4]
add esp, 8
test al, al
je 0x5879f7
test ecx, ecx
je 0x5878f9
xor eax, eax
cmp ebx, 0x9fbf1
push 0x12b6
setne al
dec eax
and eax, 4
push 0x1000b
push dword [eax + 0x644028]
call ecx
lea eax, [esi - 0x10]
push eax
call fcn.004035b0
add esp, 4
lea ebx, [eax + 0x10]
mov dword [ebp - 0x20], ebx
mov byte [ebp - 4], 5
mov ecx, 1
mov eax, dword [ebx - 8]
sub ecx, dword [ebx - 4]
sub eax, 0x104
or eax, ecx
jge 0x587933
push 0x104
lea ecx, [ebp - 0x20]
call fcn.00402cf0
mov ebx, dword [ebp - 0x20]
push str.cnreeaoc.dll
push ebx
call dword [sym.imp.SHLWAPI.dll_PathAppendW]
push dword [ebx - 8]
push ebx
call fcn.0054c667
add esp, 8
test eax, eax
js 0x58785f
cmp eax, dword [ebx - 8]
jg 0x58785f
xor ecx, ecx
mov dword [ebx - 0xc], eax
mov word [ebx + eax*2], cx
lea ecx, [ebp - 0x20]
call fcn.005aed30
mov ecx, dword [0x643bf4]
mov ebx, dword [ebp - 0x10]
test ecx, ecx
je 0x587997
push eax
xor eax, eax
cmp ebx, 0x9fbf1
push 0x10010
setne al
dec eax
and eax, 4
push dword [eax + 0x644028]
call ecx
mov byte [ebp - 4], 3
or eax, 0xffffffff
mov ecx, dword [ebp - 0x20]
add ecx, 0xfffffff0
lock xadd dword [ecx + 0xc], eax
dec eax
test eax, eax
jg 0x587a3e
mov edx, dword [ecx]
push ecx
mov eax, dword [edx]
mov edi, dword [eax + 4]
mov dword [ebp - 0x20], edi
mov edi, dword [ebp - 0x14]
cmp eax, vtable.ATL::CAtlStringMgr.0
jne 0x5879f0
mov edx, dword [edx + 4]
mov eax, dword [edx]
mov ebx, dword [eax + 4]
mov dword [ebp - 0x20], ebx
mov ebx, dword [ebp - 0x10]
cmp eax, vtable.ATL::CWin32Heap.0
jne 0x5879e9
push 0
push dword [edx + 4]
call dword [sym.imp.KERNEL32.dll_HeapFree]
jmp 0x587a3e
mov ecx, edx
call dword [ebp - 0x20]
jmp 0x587a3e
mov ecx, edx
call dword [ebp - 0x20]
jmp 0x587a3e
test ecx, ecx
je 0x587a3b
xor eax, eax
cmp ebx, 0x9fbf1
push 0x12b7
setne al
dec eax
and eax, 4
push 0x1000b
mov dword [ebp - 0x20], eax
push dword [eax + 0x644028]
call ecx
mov ecx, dword [0x643bf4]
test ecx, ecx
je 0x587a3b
mov eax, dword [ebp - 0x20]
push 0
push 0x10010
push dword [eax + 0x644028]
call ecx
mov ebx, dword [ebp - 0x10]
push str.rdd20cn.dll
push str.basiccn.ocr
mov edx, str.cnreeaoc.dll
mov ecx, esi
call fcn.005adbe0
mov ecx, dword [0x643bf4]
add esp, 8
test al, al
je 0x587cab
test ecx, ecx
je 0x587a8a
xor eax, eax
cmp ebx, 0x9fbf1
push 0x12b6
setne al
dec eax
and eax, 4
push 0x1000d
push dword [eax + 0x644028]
call ecx
lea eax, [esi - 0x10]
push eax
call fcn.004035b0
add esp, 4
lea ebx, [eax + 0x10]
mov dword [ebp - 0x20], ebx
mov byte [ebp - 4], 6
mov ecx, 1
mov eax, dword [ebx - 8]
sub ecx, dword [ebx - 4]
sub eax, 0x104
or eax, ecx
jge 0x587ac4
push 0x104
lea ecx, [ebp - 0x20]
call fcn.00402cf0
mov ebx, dword [ebp - 0x20]
push str.cnreeaoc.dll
push ebx
call dword [sym.imp.SHLWAPI.dll_PathAppendW]
push dword [ebx - 8]
push ebx
call fcn.0054c667
add esp, 8
test eax, eax
js 0x58785f
cmp eax, dword [ebx - 8]
jg 0x58785f
xor ecx, ecx
mov dword [ebx - 0xc], eax
mov word [ebx + eax*2], cx
lea ecx, [ebp - 0x20]
call fcn.005aed30
mov ecx, dword [0x643bf4]
test ecx, ecx
je 0x587b26
push eax
xor eax, eax
cmp dword [ebp - 0x10], 0x9fbf1
push 0x10012
setne al
dec eax
and eax, 4
push dword [eax + 0x644028]
call ecx
mov byte [ebp - 4], 3
or eax, 0xffffffff
mov ecx, dword [ebp - 0x20]
add ecx, 0xfffffff0
lock xadd dword [ecx + 0xc], eax
dec eax
test eax, eax
jg 0x587b6e
mov edx, dword [ecx]
push ecx
mov eax, dword [edx]
mov ebx, dword [eax + 4]
cmp eax, vtable.ATL::CAtlStringMgr.0
jne 0x587ca2
mov edx, dword [edx + 4]
mov eax, dword [edx]
mov ebx, dword [eax + 4]
cmp eax, vtable.ATL::CWin32Heap.0
jne 0x587ca2
push 0
push dword [edx + 4]
call dword [sym.imp.KERNEL32.dll_HeapFree]
mov ebx, dword [ebp - 0x10]
push str.rdd20ct.dll
push str.basicct.ocr
mov edx, str.cnreeaoc.dll
mov ecx, esi
call fcn.005adbe0
mov ecx, dword [0x643bf4]
add esp, 8
test al, al
je 0x587d05
test ecx, ecx
je 0x587bbd
xor eax, eax
cmp ebx, 0x9fbf1
push 0x12b6
setne al
dec eax
and eax, 4
push 0x1000e
push dword [eax + 0x644028]
call ecx
lea eax, [esi - 0x10]
push eax
call fcn.004035b0
add esp, 4
lea ebx, [eax + 0x10]
mov dword [ebp - 0x20], ebx
mov byte [ebp - 4], 7
mov ecx, 1
mov eax, dword [ebx - 8]
sub ecx, dword [ebx - 4]
sub eax, 0x104
or eax, ecx
jge 0x587bf7
push 0x104
lea ecx, [ebp - 0x20]
call fcn.00402cf0
mov ebx, dword [ebp - 0x20]
push str.cnreeaoc.dll
push ebx
call dword [sym.imp.SHLWAPI.dll_PathAppendW]
push dword [ebx - 8]
push ebx
call fcn.0054c667
add esp, 8
test eax, eax
js 0x58785f
cmp eax, dword [ebx - 8]
jg 0x58785f
xor ecx, ecx
mov dword [ebx - 0xc], eax
mov word [ebx + eax*2], cx
lea ecx, [ebp - 0x20]
call fcn.005aed30
mov ecx, dword [0x643bf4]
test ecx, ecx
je 0x587c59
push eax
xor eax, eax
cmp dword [ebp - 0x10], 0x9fbf1
push 0x10013
setne al
dec eax
and eax, 4
push dword [eax + 0x644028]
call ecx
mov byte [ebp - 4], 3
or eax, 0xffffffff
mov ecx, dword [ebp - 0x20]
add ecx, 0xfffffff0
lock xadd dword [ecx + 0xc], eax
dec eax
test eax, eax
jg 0x587d49
mov edx, dword [ecx]
push ecx
mov eax, dword [edx]
mov ebx, dword [eax + 4]
cmp eax, vtable.ATL::CAtlStringMgr.0
jne 0x587cff
mov edx, dword [edx + 4]
mov eax, dword [edx]
mov ebx, dword [eax + 4]
cmp eax, vtable.ATL::CWin32Heap.0
jne 0x587cff
push 0
push dword [edx + 4]
call dword [sym.imp.KERNEL32.dll_HeapFree]
jmp 0x587d49
mov ecx, edx
call ebx
jmp 0x587b6e
test ecx, ecx
je 0x587b6e
mov ebx, dword [ebp - 0x10]
xor eax, eax
cmp ebx, 0x9fbf1
push 0x12b7
setne al
dec eax
and eax, 4
push 0x1000d
mov dword [ebp - 0x20], eax
push dword [eax + 0x644028]
call ecx
mov ecx, dword [0x643bf4]
test ecx, ecx
je 0x587b71
mov eax, dword [ebp - 0x20]
push 0
push 0x10012
push dword [eax + 0x644028]
call ecx
jmp 0x587b71
mov ecx, edx
call ebx
jmp 0x587d49
test ecx, ecx
je 0x587d49
xor eax, eax
cmp ebx, 0x9fbf1
push 0x12b7
setne al
dec eax
and eax, 4
push 0x1000e
mov dword [ebp - 0x20], eax
push dword [eax + 0x644028]
call ecx
mov ecx, dword [0x643bf4]
test ecx, ecx
je 0x587d49
mov eax, dword [ebp - 0x20]
push 0
push 0x10013
push dword [eax + 0x644028]
call ecx
push str.rdd20kr.dll
push str.basickr.ocr
mov edx, str.cnreeaoc.dll
mov ecx, esi
call fcn.005adbe0
add esp, 8
test al, al
je 0x587e7a
mov ecx, dword [0x643bf4]
test ecx, ecx
je 0x587d96
xor eax, eax
cmp dword [ebp - 0x10], 0x9fbf1
push 0x12b6
setne al
dec eax
and eax, 4
push 0x1000f
push dword [eax + 0x644028]
call ecx
lea eax, [esi - 0x10]
push eax
call fcn.004035b0
add esp, 4
lea ebx, [eax + 0x10]
mov dword [ebp - 0x20], ebx
mov byte [ebp - 4], 8
mov ecx, 1
mov eax, dword [ebx - 8]
sub ecx, dword [ebx - 4]
sub eax, 0x104
or eax, ecx
jge 0x587dd0
push 0x104
lea ecx, [ebp - 0x20]
call fcn.00402cf0
mov ebx, dword [ebp - 0x20]
push str.cnreeaoc.dll
push ebx
call dword [sym.imp.SHLWAPI.dll_PathAppendW]
push dword [ebx - 8]
push ebx
call fcn.0054c667
add esp, 8
test eax, eax
js 0x58785f
cmp eax, dword [ebx - 8]
jg 0x58785f
xor ecx, ecx
mov dword [ebx - 0xc], eax
mov word [ebx + eax*2], cx
lea ecx, [ebp - 0x20]
call fcn.005aed30
mov ecx, dword [0x643bf4]
test ecx, ecx
je 0x587e32
push eax
xor eax, eax
cmp dword [ebp - 0x10], 0x9fbf1
push 0x10014
setne al
dec eax
and eax, 4
push dword [eax + 0x644028]
call ecx
mov byte [ebp - 4], 3
or eax, 0xffffffff
mov ecx, dword [ebp - 0x20]
add ecx, 0xfffffff0
lock xadd dword [ecx + 0xc], eax
dec eax
test eax, eax
jg 0x587ebd
mov edx, dword [ecx]
push ecx
mov eax, dword [edx]
mov ebx, dword [eax + 4]
cmp eax, vtable.ATL::CAtlStringMgr.0
jne 0x587e74
mov edx, dword [edx + 4]
mov eax, dword [edx]
mov ebx, dword [eax + 4]
cmp eax, vtable.ATL::CWin32Heap.0
jne 0x587e74
push 0
push dword [edx + 4]
call dword [sym.imp.KERNEL32.dll_HeapFree]
jmp 0x587ebd
mov ecx, edx
call ebx
jmp 0x587ebd
mov eax, dword [0x643bf4]
test eax, eax
je 0x587ebd
xor ebx, ebx
cmp dword [ebp - 0x10], 0x9fbf1
push 0x12b7
setne bl
dec ebx
and ebx, 4
push 0x1000f
push dword [ebx + 0x644028]
call eax
mov eax, dword [0x643bf4]
test eax, eax
je 0x587ebd
push 0
push 0x10014
push dword [ebx + 0x644028]
call eax
call fcn.005b4d40
mov ecx, dword [0x643bf4]
mov ebx, dword [ebp - 0x10]
test ecx, ecx
je 0x587eec
push eax
xor eax, eax
cmp ebx, 0x9fbf1
push 0x10001
setne al
dec eax
and eax, 4
push dword [eax + 0x644028]
call ecx
push 0x23b1
mov edx, ebx
lea ecx, [ebp - 0x2c]
call fcn.005b5f80
push 0
push 0
push dword [eax]
call fcn.0054dcdb
mov edx, dword [ebp - 0x2c]
add esp, 0x10
mov dword [ebp - 0x20], eax
add edx, 0xfffffff0
or ecx, 0xffffffff
lock xadd dword [edx + 0xc], ecx
dec ecx
test ecx, ecx
jg 0x587f61
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
mov edi, dword [eax + 4]
mov dword [ebp - 0x30], edi
mov edi, dword [ebp - 0x14]
cmp eax, vtable.ATL::CAtlStringMgr.0
jne 0x587f5b
mov ecx, dword [ecx + 4]
mov eax, dword [ecx]
mov edi, dword [eax + 4]
mov dword [ebp - 0x30], edi
mov edi, dword [ebp - 0x14]
cmp eax, vtable.ATL::CWin32Heap.0
jne 0x587f56
push 0
push dword [ecx + 4]
call dword [sym.imp.KERNEL32.dll_HeapFree]
jmp 0x587f5e
call dword [ebp - 0x30]
jmp 0x587f5e
call dword [ebp - 0x30]
mov eax, dword [ebp - 0x20]
mov ecx, dword [0x643bf4]
test ecx, ecx
je 0x587f88
push eax
xor eax, eax
cmp ebx, 0x9fbf1
push 0x10006
setne al
dec eax
and eax, 4
push dword [eax + 0x644028]
call ecx
call fcn.005ad830
mov ecx, dword [0x643bf4]
neg eax
sbb eax, eax
neg eax
add eax, 0x123e
test ecx, ecx
je 0x587fbf
push eax
xor eax, eax
cmp ebx, 0x9fbf1
push 0x10009
setne al
dec eax
and eax, 4
push dword [eax + 0x644028]
call ecx
push 0x60e1d8
lea ecx, [ebp - 0x18]
call fcn.00406070
mov byte [ebp - 4], 9
push 0x2e
push dword [ebp - 0x18]
call fcn.005471eb
add esp, 8
test eax, eax
jne 0x587fe6
or eax, 0xffffffff
jmp 0x587feb
sub eax, dword [ebp - 0x18]
sar eax, 1
push eax
lea eax, [ebp - 0x20]
push eax
lea ecx, [ebp - 0x18]
call fcn.004088d0
mov byte [ebp - 4], 0xa
mov edx, dword [eax]
mov ecx, dword [ebp - 0x18]
add ecx, 0xfffffff0
mov dword [ebp - 0x2c], ecx
lea eax, [edx - 0x10]
mov dword [ebp - 0x30], eax
lea eax, [edx - 0x10]
cmp eax, ecx
je 0x58804d
cmp dword [ecx + 0xc], 0
jl 0x588041
mov eax, dword [eax]
cmp eax, dword [ecx]
jne 0x588041
mov eax, dword [ebp - 0x30]
push eax
call fcn.004035b0
mov ecx, dword [ebp - 0x2c]
add esp, 4
mov ebx, eax
call fcn.00402670
lea eax, [ebx + 0x10]
mov ebx, dword [ebp - 0x10]
mov dword [ebp - 0x18], eax
jmp 0x58804d
push dword [edx - 0xc]
lea ecx, [ebp - 0x18]
push edx
call fcn.00403620
mov byte [ebp - 4], 9
or eax, 0xffffffff
mov ecx, dword [ebp - 0x20]
add ecx, 0xfffffff0
lock xadd dword [ecx + 0xc], eax
dec eax
test eax, eax
jg 0x5880a7
mov edx, dword [ecx]
push ecx
mov eax, dword [edx]
mov edi, dword [eax + 4]
mov dword [ebp - 0x30], edi
mov edi, dword [ebp - 0x14]
cmp eax, vtable.ATL::CAtlStringMgr.0
jne 0x5880a2
mov edx, dword [edx + 4]
mov eax, dword [edx]
mov ebx, dword [eax + 4]
mov dword [ebp - 0x30], ebx
mov ebx, dword [ebp - 0x10]
cmp eax, vtable.ATL::CWin32Heap.0
jne 0x58809b
push 0
push dword [edx + 4]
call dword [sym.imp.KERNEL32.dll_HeapFree]
jmp 0x5880a7
mov ecx, edx
call dword [ebp - 0x30]
jmp 0x5880a7
mov ecx, edx
call dword [ebp - 0x30]
push 0x60e1e0
push 0x60e1e4
lea ecx, [ebp - 0x18]
call fcn.004045b0
mov edx, dword [0x643be0]
test edx, edx
je 0x5880e8
mov eax, dword [ebp - 0x18]
mov ecx, dword [eax - 0xc]
inc ecx
push ecx
push eax
xor eax, eax
cmp ebx, 0x9fbf1
push 0xa000f
setne al
dec eax
and eax, 4
push dword [eax + 0x644028]
call edx
mov byte [ebp - 4], 3
or ebx, 0xffffffff
mov ecx, dword [ebp - 0x18]
mov eax, ebx
add ecx, 0xfffffff0
lock xadd dword [ecx + 0xc], eax
dec eax
test eax, eax
jg 0x588143
mov edx, dword [ecx]
push ecx
mov eax, dword [edx]
mov edx, dword [eax + 4]
mov dword [ebp - 0x30], edx
mov edx, dword [ecx]
cmp eax, vtable.ATL::CAtlStringMgr.0
jne 0x58813e
mov edx, dword [edx + 4]
mov eax, dword [edx]
mov edi, dword [eax + 4]
mov dword [ebp - 0x30], edi
mov edi, dword [ebp - 0x14]
cmp eax, vtable.ATL::CWin32Heap.0
jne 0x588137
push 0
push dword [edx + 4]
call dword [sym.imp.KERNEL32.dll_HeapFree]
jmp 0x588143
mov ecx, edx
call dword [ebp - 0x30]
jmp 0x588143
mov ecx, edx
call dword [ebp - 0x30]
mov byte [ebp - 4], 2
mov eax, ebx
mov ecx, dword [ebp - 0x24]
add ecx, 0xfffffff0
lock xadd dword [ecx + 0xc], eax
dec eax
test eax, eax
jg 0x58819b
mov edx, dword [ecx]
push ecx
mov eax, dword [edx]
mov edx, dword [eax + 4]
mov dword [ebp - 0x30], edx
mov edx, dword [ecx]
cmp eax, vtable.ATL::CAtlStringMgr.0
jne 0x588196
mov edx, dword [edx + 4]
mov eax, dword [edx]
mov edi, dword [eax + 4]
mov dword [ebp - 0x30], edi
mov edi, dword [ebp - 0x14]
cmp eax, vtable.ATL::CWin32Heap.0
jne 0x58818f
push 0
push dword [edx + 4]
call dword [sym.imp.KERNEL32.dll_HeapFree]
jmp 0x58819b
mov ecx, edx
call dword [ebp - 0x30]
jmp 0x58819b
mov ecx, edx
call dword [ebp - 0x30]
mov byte [ebp - 4], 1
add esi, 0xfffffff0
mov eax, ebx
lock xadd dword [esi + 0xc], eax
dec eax
test eax, eax
jg 0x5881dd
mov ecx, dword [esi]
push esi
mov eax, dword [ecx]
mov edx, dword [eax + 4]
cmp eax, vtable.ATL::CAtlStringMgr.0
jne 0x5881db
mov ecx, dword [ecx + 4]
mov eax, dword [ecx]
mov edx, dword [eax + 4]
cmp eax, vtable.ATL::CWin32Heap.0
jne 0x5881db
mov esi, dword [sym.imp.KERNEL32.dll_HeapFree]
push 0
push dword [ecx + 4]
call esi
jmp 0x5881e3
call edx
mov esi, dword [sym.imp.KERNEL32.dll_HeapFree]
mov byte [ebp - 4], 0
add edi, 0xfffffff0
mov eax, ebx
lock xadd dword [edi + 0xc], eax
dec eax
test eax, eax
jg 0x58821f
mov ecx, dword [edi]
push edi
mov eax, dword [ecx]
mov edx, dword [eax + 4]
cmp eax, vtable.ATL::CAtlStringMgr.0
jne 0x58821d
mov ecx, dword [ecx + 4]
mov eax, dword [ecx]
mov edx, dword [eax + 4]
cmp eax, vtable.ATL::CWin32Heap.0
jne 0x58821d
push 0
push dword [ecx + 4]
call esi
jmp 0x58821f
call edx
mov edi, dword [ebp - 0x34]
mov dword [ebp - 4], 0xffffffff
lock xadd dword [edi + 0xc], ebx
dec ebx
test ebx, ebx
jg 0x58826c
mov ecx, dword [edi]
push edi
mov eax, dword [ecx]
mov edx, dword [eax + 4]
cmp eax, vtable.ATL::CAtlStringMgr.0
jne 0x58826a
mov ecx, dword [ecx + 4]
mov eax, dword [ecx]
mov edx, dword [eax + 4]
cmp eax, vtable.ATL::CWin32Heap.0
jne 0x58826a
push 0
push dword [ecx + 4]
call esi
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
call edx
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret