Function at 0x5859b0
Capabilities:
Check if file exists

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x5d363d
mov eax, dword fs:[0]
push eax
sub esp, 0xb0
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 dword [ebp - 0x10], esp
mov dword [ebp - 4], 0
lea ecx, [ebp - 0x60]
mov edi, dword [ebp + 0x10]
push edi
mov dword [ebp - 0x68], 0x644170
mov dword [ebp - 0x4c], 0
call fcn.00403280
push dword [ebp - 0x60]
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
mov ecx, dword [ebp - 0x60]
test eax, eax
sete bl
add ecx, 0xfffffff0
or eax, 0xffffffff
lock xadd dword [ecx + 0xc], eax
dec eax
test eax, eax
jg 0x585a4f
mov edx, dword [ecx]
push ecx
mov eax, dword [edx]
mov esi, dword [eax + 4]
cmp eax, vtable.ATL::CAtlStringMgr.0
jne 0x585a4b
mov edx, dword [edx + 4]
mov eax, dword [edx]
mov esi, dword [eax + 4]
cmp eax, vtable.ATL::CWin32Heap.0
jne 0x585a4b
push 0
push dword [edx + 4]
call dword [sym.imp.KERNEL32.dll_HeapFree]
jmp 0x585a4f
mov ecx, edx
call esi
test bl, bl
je 0x585a78
push 0x62e4b0
lea eax, [ebp - 0x94]
mov dword [0x6441b4], 0x9ca06
push eax
mov dword [ebp - 0x94], 0xded
call fcn.005479aa
mov esi, dword [ebp + 0xc]
push esi
push 4
push ecx
push 0
mov byte [0x6441d4], 0
call fcn.005832c0
test al, al
jne 0x585aa6
push 0x62e4b0
lea eax, [ebp - 0x70]
mov dword [ebp - 0x70], 0xdf4
push eax
call fcn.005479aa
lea eax, [ebp - 0x24]
mov dword [ebp - 0x24], 0
push eax
call dword [sym.imp.SUCMLIB.dll_Ordinal_80]
xor ecx, ecx
cmp esi, 0x9fbf1
jne 0x585ac6
mov ecx, 1
mov eax, dword [0x643bcc]
test eax, eax
je 0x585add
push 2
push dword [ebp - 0x24]
push dword [ecx*4 + 0x644028]
call eax
mov ecx, dword [ebp - 0x24]
mov eax, dword [ecx]
call dword [eax + 0xc]
mov ecx, dword [ebp - 0x24]
push 0x10ed
push eax
mov edx, dword [ecx]
call dword [edx + 0x68]
push dword [ebp - 0x24]
call dword [0x643b88]
test al, al
lea eax, [ebp - 0x24]
push eax
jne 0x585b1f
call dword [sym.imp.SUCMLIB.dll_Ordinal_82]
push 0x62e4b0
lea eax, [ebp - 0x74]
mov dword [ebp - 0x74], 0xe03
push eax
call fcn.005479aa
call dword [sym.imp.SUCMLIB.dll_Ordinal_82]
lea eax, [ebp - 0x18]
mov byte [ebp - 0x1d], 0xff
push eax
mov dword [ebp - 0x18], 0
call dword [sym.imp.SUCMLIB.dll_Ordinal_73]
mov ecx, dword [ebp - 0x18]
push edi
mov eax, dword [ecx]
call dword [eax + 0x1c]
lea eax, [ebp - 0x1d]
push eax
push 0
push dword [ebp - 0x18]
call dword [0x643b68]
test al, al
jne 0x585b75
lea eax, [ebp - 0x18]
push eax
call dword [sym.imp.SUCMLIB.dll_Ordinal_76]
push 0x62e4b0
lea eax, [ebp - 0x78]
mov dword [ebp - 0x78], 0xe12
push eax
call fcn.005479aa
mov ecx, dword [ebp - 0x18]
mov eax, dword [ecx]
call dword [eax + 4]
mov ecx, dword [ebp - 0x18]
mov esi, eax
mov edx, dword [ecx]
call dword [edx + 4]
mov ebx, dword [ebp + 0x14]
mov ecx, dword [ebp - 0x18]
mov eax, dword [eax + 0xc]
imul eax, dword [esi + 8]
mov dword [ebx], eax
mov eax, dword [ecx]
call dword [eax + 4]
mov ecx, dword [ebp - 0x18]
mov esi, eax
mov edx, dword [ecx]
call dword [edx + 4]
mov ecx, dword [ebp - 0x18]
mov eax, dword [eax + 0xc]
imul eax, dword [esi + 8]
mov dword [ebx + 4], eax
mov eax, dword [ecx]
call dword [eax + 4]
mov ecx, dword [ebp - 0x18]
mov eax, dword [eax]
mov dword [ebx + 8], eax
mov eax, dword [ecx]
call dword [eax + 4]
mov ecx, dword [ebp - 0x18]
mov eax, dword [eax + 4]
mov dword [ebx + 0xc], eax
mov eax, dword [ecx]
call dword [eax + 4]
fld qword [eax + 0x10]
call fcn.005451d0
mov dword [ebx + 0x10], eax
mov eax, 0x128e
mov word [ebx + 0x14], ax
lea eax, [ebp - 0x18]
push eax
mov byte [ebx + 0x16], 0
call dword [sym.imp.SUCMLIB.dll_Ordinal_76]
mov eax, dword [ebp + 0x18]
xor ecx, ecx
xor edi, edi
mov dword [ebp - 0x40], ecx
xor esi, esi
mov dword [ebp - 0x28], edi
mov dword [ebp - 0x2c], ecx
mov dword [ebp - 0x48], ecx
mov dword [ebp - 0x44], ecx
mov dword [ebp - 0x30], esi
mov dword [ebp - 0x34], ecx
test eax, eax
jne 0x585c7a
mov edi, dword [ebp + 0x1c]
mov esi, dword [ebx + 0xc]
mov ebx, dword [ebx + 8]
mov dword [ebp - 0x30], edi
lea eax, [edi - 1]
add eax, esi
cdq
idiv edi
mov ecx, eax
lea eax, [edi - 1]
add eax, ebx
cdq
idiv edi
mov edi, eax
mov dword [ebp - 0x28], edi
cmp edi, ecx
jg 0x585c42
mov edi, ecx
mov dword [ebp - 0x28], ecx
mov eax, ebx
mov ebx, dword [ebp + 0x14]
cdq
idiv edi
mov ecx, eax
mov eax, esi
cdq
idiv edi
mov esi, eax
mov eax, dword [ebp - 0x30]
sub eax, ecx
mov dword [ebp - 0x2c], esi
cdq
sub eax, edx
sar eax, 1
mov dword [ebp - 0x48], eax
mov eax, dword [ebp - 0x30]
sub eax, esi
mov esi, dword [ebp - 0x30]
cdq
sub eax, edx
mov dword [ebp - 0x34], esi
mov edx, eax
sar edx, 1
mov dword [ebp - 0x44], edx
jmp 0x585ce8
cmp eax, 1
jne 0x585cbc
mov eax, dword [ebx + 0x10]
cdq
idiv dword [ebp + 0x1c]
mov edi, eax
mov dword [ebp - 0x28], eax
cmp edi, 1
jge 0x585c98
mov edi, 1
mov dword [ebp - 0x28], edi
mov eax, dword [ebx + 8]
cdq
idiv edi
mov dword [ebp - 0x48], ecx
mov esi, eax
mov dword [ebp - 0x44], ecx
mov eax, dword [ebx + 0xc]
cdq
idiv edi
mov dword [ebp - 0x40], esi
mov edx, eax
mov dword [ebp - 0x30], esi
mov dword [ebp - 0x2c], edx
mov dword [ebp - 0x34], edx
jmp 0x585ceb
cmp eax, 2
jne 0x585ceb
mov eax, dword [ebx + 8]
mov edi, dword [ebp + 0x1c]
cdq
idiv edi
mov dword [ebp - 0x48], esi
mov ecx, eax
mov dword [ebp - 0x44], esi
mov eax, dword [ebx + 0xc]
mov esi, ecx
cdq
idiv edi
mov dword [ebp - 0x28], edi
mov edx, eax
mov dword [ebp - 0x30], esi
mov dword [ebp - 0x2c], edx
mov dword [ebp - 0x34], edx
mov dword [ebp - 0x40], ecx
mov ecx, dword [ebx + 4]
lea eax, [ecx - 1]
cmp eax, 0x2f
ja case.0x585cfd.2
movzx eax, byte [eax + 0x58625c]
jmp dword [eax*4 + 0x586250]
mov eax, dword [ebx + 8]
add eax, 7
cdq
and edx, 7
lea ebx, [edx + eax]
sar ebx, 3
jmp 0x585d30
mov eax, dword [ebx + 8]
imul eax, ecx
cdq
and edx, 7
lea ebx, [edx + eax]
sar ebx, 3
add ebx, 3
and ebx, 0xfffffffc
jmp 0x585d30
xor ebx, ebx
mov eax, esi
shl eax, 5
cdq
and edx, 7
add eax, edx
sar eax, 3
add eax, 3
and eax, 0xfffffffc
mov esi, eax
mov dword [ebp - 0x90], eax
imul esi, dword [ebp - 0x34]
cmp esi, 3
jge 0x585d6a
push 0x62e4b0
lea eax, [ebp - 0x7c]
mov dword [ebp - 0x7c], 0xe64
push eax
call fcn.005479aa
push esi
call fcn.0040e5a7
add esp, 4
mov dword [ebp + 0x18], eax
mov dword [ebp - 0x4c], eax
push esi
mov esi, eax
push 0
push esi
call fcn.00547850
imul ebx, edi
add esp, 0xc
mov dword [ebp - 0x84], 0
mov byte [ebp + 0x13], 0
mov dword [ebp - 0x88], ebx
cmp ebx, 3
jge 0x585db8
push 0x62e4b0
lea eax, [ebp - 0x80]
mov dword [ebp - 0x80], 0xe74
push eax
call fcn.005479aa
push ebx
call fcn.0040e5a7
mov ebx, eax
add esp, 4
mov dword [ebp - 0x3c], ebx
xor edx, edx
mov dword [ebp - 0x5c], edx
cmp edx, dword [ebp - 0x2c]
jge 0x585e33
xor eax, eax
je 0x585e0f
lea ecx, [ebp - 0xb8]
call fcn.00403c10
imul eax, edx, 0x2710
cdq
idiv dword [ebp - 0x2c]
mov edx, eax
call fcn.005b0220
sub esp, 0x24
lea esi, [ebp - 0xb8]
mov ecx, 9
mov edi, esp
rep movsd dword es:[edi], dword [esi]
xor eax, eax
call eax
mov edi, dword [ebp - 0x28]
add esp, 0x24
mov esi, dword [ebp + 0x18]
cmp byte [0x6441d4], 0
je 0x585edc
push esi
call fcn.0040e5b0
add esp, 4
xor eax, eax
mov dword [ebp + 0x18], eax
mov dword [ebp - 0x4c], eax
call dword [0x643b78]
mov esi, dword [ebp + 0x14]
mov eax, edi
imul eax, dword [ebp - 0x2c]
mov ecx, dword [esi + 0xc]
sub ecx, eax
test ecx, ecx
jle 0x585e4b
call dword [0x643b78]
push ebx
call fcn.0040e5b0
mov eax, dword [esi + 4]
add esp, 4
mov dword [esi], eax
mov eax, dword [ebp - 0x34]
mov dword [esi + 0xc], eax
mov eax, dword [esi + 0x10]
cdq
idiv edi
xor edx, edx
mov ebx, dword [ebp - 0x30]
mov dword [esi + 4], 0x20
mov dword [esi + 8], ebx
mov dword [esi + 0x10], eax
je 0x58620c
lea ecx, [ebp - 0xb8]
call fcn.00403c10
sub esp, 0x24
mov dword [ebp - 0xb8], edx
mov dword [ebp - 0xb4], edx
lea esi, [ebp - 0xb8]
mov byte [ebp - 0xb0], dl
mov ecx, 9
mov dword [ebp - 0xa8], edx
mov edi, esp
mov dword [ebp - 0x9c], edx
mov dword [ebp - 0x98], edx
mov dword [ebp - 0xac], 0x2710
mov dword [ebp - 0xa4], 0xb
rep movsd dword es:[edi], dword [esi]
call edx
add esp, 0x24
jmp 0x58620c
lea eax, [ebp + 0x13]
push eax
lea eax, [ebp - 0x84]
push eax
push dword [ebp - 0x88]
push ebx
call dword [0x643b5c]
test al, al
jne 0x585f1c
push ebx
call fcn.0040e5b0
add esp, 4
mov dword [ebp - 0x8c], 0xe8f
lea eax, [ebp - 0x8c]
push 0x62e4b0
push eax
call fcn.005479aa
mov ecx, dword [ebp - 0x40]
test ecx, ecx
jle 0x5861e0
mov eax, dword [ebp - 0x34]
xor esi, esi
sub eax, dword [ebp - 0x5c]
sub eax, dword [ebp - 0x44]
mov edx, dword [ebp - 0x48]
dec eax
imul eax, dword [ebp - 0x90]
mov dword [ebp - 0x64], ecx
mov ecx, dword [ebp + 0x14]
mov dword [ebp + 0xc], esi
mov dword [ebp - 0x58], ebx
add eax, dword [ebp + 0x18]
lea eax, [eax + edx*4]
add eax, 2
mov dword [ebp - 0x54], eax
mov eax, dword [ecx + 4]
xor edx, edx
xor ebx, ebx
mov dword [ebp + 0x1c], edx
dec eax
mov dword [ebp - 0x38], ebx
cmp eax, 0x2f
ja case.0x585f73.2
movzx eax, byte [eax + 0x5862a4]
jmp dword [eax*4 + 0x58628c]
test edi, edi
jle 0x58600e
mov eax, dword [ecx + 8]
add eax, 7
mov dword [ebp - 0x6c], edx
cdq
and edx, 7
mov dword [ebp - 0x1c], edi
add eax, edx
sar eax, 3
mov dword [ebp - 0x50], eax
lea ebx, [ebx]
mov edx, dword [ebp + 0xc]
xor esi, esi
mov eax, edx
mov dword [ebp + 0x1c], edx
lea ebx, [ebx]
lea ecx, [edx + esi]
and ecx, reloc.OLEAUT32.dll_VariantInit
jns 0x585fc0
dec ecx
or ecx, 0xfffffff8
inc ecx
cdq
mov ebx, 0x80
and edx, 7
sar ebx, cl
mov ecx, dword [ebp - 0x6c]
add eax, edx
mov edx, dword [ebp - 0x3c]
sar eax, 3
add eax, ecx
mov al, byte [eax + edx]
mov edx, dword [ebp + 0xc]
and al, bl
mov ebx, dword [ebp - 0x38]
movzx eax, al
neg eax
sbb eax, eax
inc esi
and eax, 0xff
add ebx, eax
mov eax, dword [ebp + 0x1c]
inc eax
mov dword [ebp - 0x38], ebx
mov dword [ebp + 0x1c], eax
cmp esi, edi
jl 0x585fb0
add ecx, dword [ebp - 0x50]
sub dword [ebp - 0x1c], 1
mov dword [ebp - 0x6c], ecx
jne 0x585fa0
mov esi, edx
mov ecx, edi
mov eax, ebx
imul ecx, edi
cdq
idiv ecx
mov edx, eax
mov dword [ebp + 0x1c], edx
mov ebx, edx
jmp 0x5861ab
test edi, edi
jle 0x58600e
mov edx, dword [ebp - 0x3c]
add edx, esi
mov dword [ebp + 0x1c], edi
xor ecx, ecx
movzx eax, byte [edx + ecx]
inc ecx
add ebx, eax
cmp ecx, edi
jl 0x586032
mov eax, dword [ebp + 0x14]
add edx, dword [eax + 8]
sub dword [ebp + 0x1c], 1
jne 0x586030
jmp 0x58600e
test edi, edi
jle 0x58607d
mov eax, dword [ecx + 8]
mov esi, dword [ebp - 0x58]
add eax, eax
mov dword [ebp - 0x50], eax
mov dword [ebp + 0x1c], edi
lea ecx, [ecx]
mov ecx, esi
mov edx, edi
movzx eax, word [ecx]
lea ecx, [ecx + 2]
add ebx, eax
sub edx, 1
jne 0x586064
add esi, dword [ebp - 0x50]
sub dword [ebp + 0x1c], 1
jne 0x586060
mov esi, dword [ebp + 0xc]
mov ecx, edi
mov eax, ebx
imul ecx, edi
cdq
idiv ecx
cdq
and edx, 0xff
add edx, eax
sar edx, 8
mov dword [ebp + 0x1c], edx
mov ebx, edx
jmp 0x5861ab
mov esi, dword [ebp + 0x1c]
xor eax, eax
mov dword [ebp - 0x1c], eax
test edi, edi
jle 0x5860f0
lea esp, [esp]
mov ecx, dword [ecx + 8]
imul ecx, eax
mov eax, dword [ebp - 0x3c]
mov dword [ebp + 0x1c], edi
add ecx, dword [ebp + 0xc]
lea eax, [eax + ecx*2]
add ecx, 2
add ecx, eax
movzx eax, byte [ecx - 2]
lea ecx, [ecx + 3]
add edx, eax
movzx eax, byte [ecx - 4]
add ebx, eax
movzx eax, byte [ecx - 3]
add esi, eax
sub dword [ebp + 0x1c], 1
jne 0x5860c7
mov eax, dword [ebp - 0x1c]
mov ecx, dword [ebp + 0x14]
inc eax
mov dword [ebp - 0x1c], eax
cmp eax, edi
jl 0x5860b0
mov eax, edx
mov ecx, edi
imul ecx, edi
cdq
idiv ecx
mov dword [ebp - 0x38], eax
mov eax, ebx
cdq
idiv ecx
mov ebx, eax
mov eax, esi
cdq
idiv ecx
mov dword [ebp + 0x1c], eax
jmp 0x5861a5
mov esi, dword [ebp + 0x1c]
xor ecx, ecx
mov dword [ebp - 0x1c], ecx
test edi, edi
jle 0x586166
lea ecx, [ecx]
mov eax, dword [ebp + 0x14]
mov dword [ebp + 0x1c], edi
mov eax, dword [eax + 8]
imul eax, ecx
mov ecx, dword [ebp - 0x3c]
add eax, dword [ebp + 0xc]
lea eax, [eax + eax*2]
lea ecx, [ecx + eax*2]
add ecx, 4
jmp 0x586140
movzx eax, word [ecx - 4]
lea ecx, [ecx + 6]
add edx, eax
movzx eax, word [ecx - 8]
add ebx, eax
movzx eax, word [ecx - 6]
add esi, eax
sub dword [ebp + 0x1c], 1
jne 0x586140
mov ecx, dword [ebp - 0x1c]
inc ecx
mov dword [ebp - 0x1c], ecx
cmp ecx, edi
jl 0x586120
mov eax, edx
mov ecx, edi
cdq
imul ecx, edi
idiv ecx
cdq
and edx, 0xff
add eax, edx
sar eax, 8
mov dword [ebp - 0x38], eax
mov eax, ebx
cdq
idiv ecx
cdq
and edx, 0xff
lea ebx, [edx + eax]
mov eax, esi
cdq
idiv ecx
sar ebx, 8
cdq
and edx, 0xff
add edx, eax
sar edx, 8
mov dword [ebp + 0x1c], edx
mov esi, dword [ebp + 0xc]
mov edx, dword [ebp - 0x38]
mov ecx, dword [ebp + 0x14]
mov eax, dword [ebp - 0x54]
add esi, edi
mov dword [ebp + 0xc], esi
mov byte [eax - 2], dl
mov edx, eax
mov eax, dword [ebp + 0x1c]
mov byte [edx - 1], bl
mov byte [edx], al
lea eax, [edi + edi]
add dword [ebp - 0x58], eax
mov byte [edx + 1], 0xff
add edx, 4
sub dword [ebp - 0x64], 1
mov dword [ebp - 0x54], edx
jne 0x585f55
mov ebx, dword [ebp - 0x3c]
cmp byte [ebp + 0x13], 0
jne 0x585e33
mov edx, dword [ebp - 0x5c]
mov esi, dword [ebp + 0x18]
inc edx
jmp 0x585dc8
sub esp, 8
mov dword [ebp - 4], 0xffffffff
push dword [ebp + 8]
call fcn.00583250
mov eax, dword [ebp + 0x18]
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0x1c