Function at 0x407520
Capabilities:
Check if file exists
Enumerate network shares
Get file attributes

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x459d85
mov eax, dword fs:[0]
push eax
mov eax, 0xae24
call fcn.00409a60
mov eax, dword [0x46f20c]
xor eax, ebp
mov dword [ebp - 0x10], eax
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov esi, ecx
mov dword [ebp - 0xadfc], esi
mov eax, dword [esi + 8]
lea edi, [esi + 8]
mov dword [ebp - 0xae28], 0
mov dword [ebp - 0xae04], edi
test eax, eax
je 0x407577
mov eax, dword [eax]
jmp 0x407579
xor eax, eax
movzx eax, word [eax + 4]
push eax
call fcn.00427d33
add esp, 4
test eax, eax
je 0x407846
mov esi, dword [edi]
test esi, esi
je 0x4075a7
mov eax, dword [esi + 4]
test eax, eax
jne 0x4075a9
push dword [esi]
call fcn.0040abb0
mov dword [esi + 4], eax
jmp 0x4075a9
xor eax, eax
add eax, 2
push eax
call sub.WS2_32.dll_inet_addr
mov dword [ebp - 0xae24], eax
cmp eax, 0xffffffff
je 0x40783b
push 2
push 4
lea eax, [ebp - 0xae24]
push eax
call sub.WS2_32.dll_gethostbyaddr
test eax, eax
je 0x40783b
mov ecx, dword [eax]
lea edx, [ebp - 0x31c]
sub edx, ecx
mov al, byte [ecx]
lea ecx, [ecx + 1]
mov byte [edx + ecx - 1], al
test al, al
jne 0x4075e3
lea eax, [ebp - 0x31c]
push eax
call fcn.00436b42
lea eax, [ebp - 0x31c]
push 0x2e
push eax
call fcn.0040bc20
add esp, 0xc
lea ecx, [ebp - 0xae00]
mov esi, eax
lea eax, [ebp - 0x31c]
mov dword [ebp - 0xae0c], esi
push eax
test esi, esi
je 0x407737
mov byte [esi], 0
call fcn.00404b30
push 0x460fd8
lea ecx, [ebp - 0xae1c]
mov dword [ebp - 4], 0
call fcn.00404bc0
lea ecx, [ebp - 0xae00]
mov byte [ebp - 4], 1
push ecx
lea ecx, [ebp - 0xae18]
push ecx
mov ecx, eax
call fcn.00404cd0
mov edi, eax
mov eax, dword [ebp - 0xae04]
cmp eax, edi
je 0x407687
mov ecx, eax
call fcn.00407f40
mov edx, dword [ebp - 0xae04]
mov eax, dword [edi]
mov dword [edx], eax
test eax, eax
je 0x407687
lock inc dword [eax + 8]
lea ecx, [ebp - 0xae18]
call fcn.00404c70
lea ecx, [ebp - 0xae1c]
call fcn.00404c70
lea ecx, [ebp - 0xae00]
mov dword [ebp - 4], 0xffffffff
call fcn.00404c70
mov edi, dword [ebp - 0xadfc]
lea eax, [esi + 1]
test eax, eax
je 0x4076e3
mov esi, dword [edi + 0xc]
test esi, esi
je 0x4076e3
mov eax, dword [esi + 4]
test eax, eax
jne 0x4076d4
push dword [esi]
call fcn.0040abb0
mov dword [esi + 4], eax
mov ecx, dword [ebp - 0xae0c]
inc ecx
cmp eax, ecx
je 0x407823
lea ecx, [edi + 0xc]
call fcn.00407f40
push 0xc
call fcn.00409134
mov esi, eax
add esp, 4
mov dword [ebp - 0xae20], esi
mov dword [ebp - 4], 2
test esi, esi
je 0x40772d
mov eax, dword [ebp - 0xae0c]
inc eax
mov dword [esi + 4], 0
push eax
mov dword [esi + 8], 1
call fcn.0040acd0
mov dword [esi], eax
mov dword [edi + 0xc], esi
jmp 0x407812
xor esi, esi
mov dword [edi + 0xc], esi
jmp 0x407812
call fcn.00404b30
push 0x460fd8
lea ecx, [ebp - 0xae18]
mov dword [ebp - 4], 3
call fcn.00404bc0
lea ecx, [ebp - 0xae00]
mov byte [ebp - 4], 4
push ecx
lea ecx, [ebp - 0xae1c]
push ecx
mov ecx, eax
call fcn.00404cd0
mov esi, eax
cmp edi, esi
je 0x407785
mov ecx, edi
call fcn.00407f40
mov eax, dword [esi]
mov dword [edi], eax
test eax, eax
je 0x407785
lock inc dword [eax + 8]
lea ecx, [ebp - 0xae1c]
call fcn.00404c70
lea ecx, [ebp - 0xae18]
call fcn.00404c70
lea ecx, [ebp - 0xae00]
mov dword [ebp - 4], 0xffffffff
call fcn.00404c70
mov esi, dword [ebp - 0xadfc]
mov eax, dword [esi + 0xc]
lea edi, [esi + 0xc]
test eax, eax
je 0x4077c5
cmp dword [eax], 0x460e08
je 0x407843
mov ecx, edi
call fcn.00407f40
push 0xc
call fcn.00409134
mov esi, eax
add esp, 4
mov dword [ebp - 0xae20], esi
mov dword [ebp - 4], 5
test esi, esi
je 0x40780e
push 0x460e08
mov dword [esi + 4], 0
mov dword [esi + 8], 1
call dword [sym.imp.OLEAUT32.dll_SysReAllocString]
mov dword [esi], eax
test eax, eax
je 0x407eff
jmp 0x407810
xor esi, esi
mov dword [edi], esi
mov dword [ebp - 4], 0xffffffff
test esi, esi
je 0x407f09
jmp 0x40782d
mov esi, edi
mov edi, dword [ebp - 0xae04]
jmp 0x407846
mov esi, dword [ebp - 0xadfc]
mov edi, dword [ebp - 0xae04]
jmp 0x407846
mov esi, dword [ebp - 0xadfc]
jmp 0x407846
lea edi, [esi + 8]
cmp dword [0x4700b4], 0
mov dword [ebp - 0xae14], 0
mov dword [ebp - 0xae2c], 0
jne 0x407eae
mov eax, dword [edi]
test eax, eax
je 0x407871
mov eax, dword [eax]
jmp 0x407873
xor eax, eax
lea ecx, [ebp - 0xae28]
push ecx
lea ecx, [ebp - 0xae2c]
push ecx
lea ecx, [ebp - 0xae14]
push ecx
push 0xffffffffffffffff
lea ecx, [ebp - 0xae0c]
push ecx
push 0
push eax
call sub.NETAPI32.dll_NetShareEnum
mov edi, eax
test edi, edi
je 0x4078ab
cmp edi, 0xea
jne 0x407da3
mov eax, dword [ebp - 0xae14]
cmp eax, 0x2710
jae 0x407e4d
xor ecx, ecx
mov dword [ebp - 0xae00], ecx
test eax, eax
je 0x407d87
nop dword [eax]
cmp dword [0x4700b4], 0
jne 0x407d87
mov eax, dword [ebp - 0xae0c]
mov esi, dword [eax + ecx*4]
mov ecx, str.ADMIN_
mov eax, esi
nop dword [eax]
mov dx, word [eax]
cmp dx, word [ecx]
jne 0x407916
test dx, dx
je 0x407912
mov dx, word [eax + 2]
cmp dx, word [ecx + 2]
jne 0x407916
add eax, 4
add ecx, 4
test dx, dx
jne 0x4078f0
xor eax, eax
jmp 0x40791b
sbb eax, eax
or eax, 1
test eax, eax
je 0x407d68
mov ecx, str.IPC_
mov eax, esi
nop word [eax + eax]
mov dx, word [eax]
cmp dx, word [ecx]
jne 0x407956
test dx, dx
je 0x407952
mov dx, word [eax + 2]
cmp dx, word [ecx + 2]
jne 0x407956
add eax, 4
add ecx, 4
test dx, dx
jne 0x407930
xor eax, eax
jmp 0x40795b
sbb eax, eax
or eax, 1
test eax, eax
je 0x407d68
mov edi, dword [ebp - 0xae04]
mov eax, dword [edi]
test eax, eax
je 0x407973
mov eax, dword [eax]
jmp 0x407975
xor eax, eax
push esi
push eax
lea eax, [ebp - 0x218]
push str._s_s
push eax
call fcn.004044a0
mov ecx, dword [edi]
add esp, 0x10
mov dword [ebp - 0xae08], 0
test ecx, ecx
je 0x40799f
mov ecx, dword [ecx]
jmp 0x4079a1
xor ecx, ecx
mov edx, dword [ebp - 0xae00]
lea eax, [ebp - 0xae08]
push eax
mov eax, dword [ebp - 0xae0c]
push 0x1f6
push dword [eax + edx*4]
push ecx
call sub.NETAPI32.dll_NetShareGetInfo
mov edi, eax
test edi, edi
je 0x407a9a
push 0
push 0x3e8
lea eax, [ebp - 0x11b8]
push eax
push 0
push edi
push 0
push 0x1000
call dword [sym.imp.KERNEL32.dll_FormatMessageW]
mov esi, eax
test esi, esi
je 0x407a34
lea eax, [esi + esi]
nop dword [eax]
nop word [eax + eax]
movzx ecx, word [ebp + eax - 0x11ba]
push ecx
call fcn.004366e0
add esp, 4
test eax, eax
je 0x407a4f
dec esi
lea eax, [esi + esi]
cmp eax, 0x7d0
jae 0x407f13
xor ecx, ecx
mov word [ebp + eax - 0x11b8], cx
test esi, esi
jne 0x407a00
jmp 0x407a4f
call dword [sym.imp.KERNEL32.dll_GetLastError]
push edi
lea eax, [ebp - 0x11b8]
push str.Error__d
push eax
call fcn.004044a0
add esp, 0xc
mov esi, dword [ebp - 0xadfc]
mov eax, dword [esi + 0xc]
test eax, eax
je 0x407a60
mov eax, dword [eax]
jmp 0x407a62
xor eax, eax
push 0x460e08
push 0x460e08
push 0x460e08
push 0x460e08
lea ecx, [ebp - 0x11b8]
push ecx
push 0x460e08
push eax
lea eax, [ebp - 0x218]
push eax
push dword [esi + 4]
call fcn.00405520
add esp, 0x24
jmp 0x407d6e
mov eax, dword [ebp - 0xae08]
mov eax, dword [eax + 4]
test eax, eax
jne 0x407ad2
lea eax, [ebp - 0x218]
push eax
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
jne 0x407acb
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 2
jne 0x407acb
mov esi, str.Disk__not_found_
jmp 0x407ae0
mov esi, str.Disk
jmp 0x407ae0
cmp eax, 1
jne 0x407d68
mov esi, str.Printer
mov eax, dword [ebp - 0xae08]
mov dword [ebp - 0xae10], 0xffffffff
mov eax, dword [eax + 0x24]
test eax, eax
jne 0x407aff
mov dword [ebp - 0xae10], eax
jmp 0x407b55
push eax
call dword [sym.imp.ADVAPI32.dll_IsValidSecurityDescriptor]
test eax, eax
je 0x407b4f
lea eax, [ebp - 0xae30]
push eax
lea eax, [ebp - 0xae10]
push eax
lea eax, [ebp - 0xae20]
push eax
mov eax, dword [ebp - 0xae08]
push dword [eax + 0x24]
call dword [sym.imp.ADVAPI32.dll_GetSecurityDescriptorDacl]
test eax, eax
je 0x407b4f
mov eax, dword [ebp - 0xae10]
mov ecx, 0xffffffff
cmp dword [ebp - 0xae20], 0
cmove eax, ecx
mov dword [ebp - 0xae10], eax
jmp 0x407b55
mov eax, dword [ebp - 0xae10]
xor ecx, ecx
mov word [ebp - 0x30f8], cx
mov word [ebp - 0x8eb8], cx
mov word [ebp - 0x6f78], cx
mov word [ebp - 0x5038], cx
mov word [ebp - 0xadf8], cx
cmp eax, 0xffffffff
jne 0x407b98
mov dword [ebp - 0x30f8], 0x3f003f
mov dword [ebp - 0x30f4], 0x3f
jmp 0x407cff
test eax, eax
jne 0x407bc7
mov eax, dword [0x4610cc]
movups xmm0, xmmword [str.Read_Write]
mov dword [ebp - 0x30e8], eax
mov ax, word [0x4610d0]
movups xmmword [ebp - 0x30f8], xmm0
mov word [ebp - 0x30e4], ax
jmp 0x407cff
mov edx, dword [ebp - 0xae04]
mov ecx, dword [edx]
test ecx, ecx
je 0x407bd7
mov ecx, dword [ecx]
jmp 0x407bd9
xor ecx, ecx
lea edx, [ebp - 0xadf8]
push edx
lea edx, [ebp - 0x5038]
push edx
lea edx, [ebp - 0x6f78]
push edx
lea edx, [ebp - 0x8eb8]
push edx
lea edx, [ebp - 0x30f8]
push edx
push ecx
push eax
call fcn.00404f30
add esp, 0x1c
cmp word [ebp - 0x30f8], 0x45
jne 0x407c59
cmp word [ebp - 0x8eb8], 0x45
jne 0x407c42
mov eax, dword [0x4610cc]
movups xmm0, xmmword [str.Read_Write]
mov dword [ebp - 0x30e8], eax
mov ax, word [0x4610d0]
movups xmmword [ebp - 0x30f8], xmm0
mov word [ebp - 0x30e4], ax
jmp 0x407c7e
mov ax, word [0x460b9c]
movq xmm0, qword [str.Read]
mov word [ebp - 0x30f0], ax
jmp 0x407c76
cmp word [ebp - 0x8eb8], 0x45
jne 0x407c7e
mov eax, dword [0x460ba8]
movq xmm0, qword [str.Write]
mov dword [ebp - 0x30f0], eax
movq qword [ebp - 0x30f8], xmm0
lea eax, [ebp - 0x6f78]
push 0
push eax
call fcn.0040b586
sub eax, 2
lea ecx, [ebp - 0x6f78]
add esp, 8
cmp eax, ecx
jb 0x407cbf
nop dword [eax]
movzx ecx, word [eax]
cmp ecx, 0x20
je 0x407cad
cmp ecx, 0x2c
jne 0x407cbf
xor ecx, ecx
mov word [eax], cx
sub eax, 2
lea ecx, [ebp - 0x6f78]
cmp eax, ecx
jae 0x407ca0
lea eax, [ebp - 0x5038]
push 0
push eax
call fcn.0040b586
sub eax, 2
lea ecx, [ebp - 0x5038]
add esp, 8
cmp eax, ecx
jb 0x407cff
nop dword [eax]
movzx ecx, word [eax]
cmp ecx, 0x20
je 0x407ced
cmp ecx, 0x2c
jne 0x407cff
xor ecx, ecx
mov word [eax], cx
sub eax, 2
lea ecx, [ebp - 0x5038]
cmp eax, ecx
jae 0x407ce0
push 0
call fcn.004153bc
mov ecx, dword [ebp - 0xadfc]
add esp, 4
mov eax, dword [ecx + 0xc]
test eax, eax
je 0x407d1a
mov ecx, dword [eax]
jmp 0x407d1c
xor ecx, ecx
lea eax, [ebp - 0xadf8]
push eax
lea eax, [ebp - 0x5038]
push eax
lea eax, [ebp - 0x6f78]
push eax
lea eax, [ebp - 0x30f8]
push eax
mov eax, dword [ebp - 0xae08]
push esi
mov esi, dword [ebp - 0xadfc]
push dword [eax + 0x18]
lea eax, [ebp - 0x218]
push ecx
push eax
push dword [esi + 4]
call fcn.00405520
add esp, 0x24
push dword [ebp - 0xae08]
call sub.NETAPI32.dll_NetApiBufferFree
jmp 0x407d6e
mov esi, dword [ebp - 0xadfc]
mov ecx, dword [ebp - 0xae00]
inc ecx
mov dword [ebp - 0xae00], ecx
cmp ecx, dword [ebp - 0xae14]
jb 0x4078d0
push dword [ebp - 0xae0c]
call sub.NETAPI32.dll_NetApiBufferFree
cmp edi, 0xea
jne 0x407eae
jmp 0x407843
push 0
push 0x3e8
lea eax, [ebp - 0x9e8]
push eax
push 0
push edi
push 0
push 0x1000
call dword [sym.imp.KERNEL32.dll_FormatMessageW]
mov esi, eax
test esi, esi
je 0x407e04
lea eax, [esi + esi]
nop word [eax + eax]
movzx ecx, word [ebp + eax - 0x9ea]
push ecx
call fcn.004366e0
add esp, 4
test eax, eax
je 0x407e1f
dec esi
lea eax, [esi + esi]
cmp eax, 0x7d0
jae 0x407f13
xor ecx, ecx
mov word [ebp + eax - 0x9e8], cx
test esi, esi
jne 0x407dd0
jmp 0x407e1f
call dword [sym.imp.KERNEL32.dll_GetLastError]
push edi
lea eax, [ebp - 0x9e8]
push str.Error__d
push eax
call fcn.004044a0
add esp, 0xc
mov esi, dword [ebp - 0xadfc]
mov eax, dword [esi + 0xc]
test eax, eax
je 0x407e30
mov ecx, dword [eax]
jmp 0x407e32
xor ecx, ecx
mov eax, dword [esi + 8]
test eax, eax
je 0x407e43
mov eax, dword [eax]
lea edx, [ebp - 0x9e8]
jmp 0x407e87
xor eax, eax
lea edx, [ebp - 0x9e8]
jmp 0x407e87
push dword [ebp - 0xae14]
lea eax, [ebp - 0x2e0]
push str.NetShareEnum_returned__d_shares__bogus_
push eax
call fcn.004044a0
mov ecx, dword [esi + 0xc]
add esp, 0xc
test ecx, ecx
je 0x407e72
mov ecx, dword [ecx]
jmp 0x407e74
xor ecx, ecx
mov eax, dword [esi + 8]
test eax, eax
je 0x407e7f
mov eax, dword [eax]
jmp 0x407e81
xor eax, eax
lea edx, [ebp - 0x2e0]
push 0x460e08
push 0x460e08
push 0x460e08
push 0x460e08
push 0x460ff4
push edx
push ecx
push eax
push dword [esi + 4]
call fcn.00405520
add esp, 0x24
or eax, 0xffffffff
lock xadd dword [0x4702c4], eax
dec eax
jne 0x407ed1
push 0
push 0
push 0x8000
push dword [0x4702cc]
call dword [sym.imp.USER32.dll_PostMessageW]
mov ecx, esi
call fcn.00406ef0
test esi, esi
je 0x407ee4
mov eax, dword [esi]
mov ecx, esi
push 1
call dword [eax]
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.00409118
mov esp, ebp
pop ebp
ret
push 0x8007000e
call fcn.00408380
push 0x8007000e
call fcn.00408380
call fcn.00409648
int3