Function at 0x409940
Capabilities:
Enumerate network shares
Get disk information

Disassembly:
push 0xffffffffffffffff
push 0x41c600
mov eax, dword fs:[0]
push eax
sub esp, 0x68
mov eax, dword [0x42452c]
xor eax, esp
mov dword [esp + 0x64], eax
push ebx
push ebp
push esi
push edi
mov eax, dword [0x42452c]
xor eax, esp
push eax
lea eax, [esp + 0x7c]
mov dword fs:[0], eax
mov esi, dword [esp + 0x8c]
mov eax, dword [esi + 0x24]
push 0x3a
or ebx, 0xffffffff
push eax
mov dword [esp + 0x20], ebx
mov dword [esp + 0x1c], 0x4000
call dword [sym.imp.MSVCR80.dll_strchr]
xor ebp, ebp
add esp, 8
cmp eax, ebp
je 0x4099a2
sub eax, dword [esi + 0x24]
jmp 0x4099a7
mov eax, dword [0x41fca8]
cmp eax, 1
jne 0x409b94
call fcn.004162a0
test al, al
jne 0x409b94
push 1
push ebp
lea eax, [esp + 0x54]
push eax
mov ecx, esi
call fcn.004088d0
push 0x41f5ac
lea ecx, [esp + 0x24]
push ecx
lea ecx, [esp + 0x54]
mov dword [esp + 0x8c], ebp
call fcn.004097a0
mov eax, dword [eax + 0x24]
push eax
mov byte [esp + 0x88], 1
call dword [sym.imp.KERNEL32.dll_GetDriveTypeA]
movzx edi, ax
mov eax, dword [esp + 0x44]
lea edx, [esp + 0x24]
cmp eax, edx
mov byte [esp + 0x84], 0
je 0x409a1c
cmp eax, ebp
je 0x409a1c
mov ecx, dword [eax - 4]
push eax
call fcn.0040daa0
cmp di, 4
je 0x409a4f
mov eax, dword [esp + 0x70]
lea ecx, [esp + 0x50]
cmp eax, ecx
mov dword [esp + 0x84], ebx
je 0x409b94
cmp eax, ebp
je 0x409b94
mov ecx, dword [eax - 4]
push eax
call fcn.0040daa0
jmp 0x409b94
lea edx, [esp + 0x1c]
push edx
push ebp
push ebp
push 1
push 1
call sub.MPR.dll_WNetOpenEnumA
test eax, eax
jne 0x409a22
mov edx, dword [esp + 0x14]
push edx
call sub.fbclient.dll_Ordinal_1
mov edi, eax
cmp edi, ebp
jne 0x409a7f
mov dword [esp + 0x84], ebx
jmp 0x409b8b
mov edx, dword [esp + 0x1c]
lea eax, [esp + 0x14]
push eax
push edi
lea ecx, [esp + 0x20]
push ecx
push edx
call sub.MPR.dll_WNetEnumResourceA
cmp eax, 0xea
jne 0x409ac6
push edi
call sub.fbclient.dll_Ordinal_37
mov eax, dword [esp + 0x14]
push eax
call sub.fbclient.dll_Ordinal_1
mov edi, eax
cmp edi, ebp
je 0x409a73
mov eax, dword [esp + 0x1c]
lea ecx, [esp + 0x14]
push ecx
push edi
lea edx, [esp + 0x20]
push edx
push eax
call sub.MPR.dll_WNetEnumResourceA
mov eax, dword [esp + 0x18]
test eax, eax
mov ebx, edi
jbe 0x409b06
cmp dword [ebx + 0x10], 0
je 0x409afc
cmp word [esp + 0x74], 0
ja 0x409aef
push str.Firebird::string___pos_out_of_range
call fcn.00404d90
mov eax, dword [esp + 0x1c]
add esp, 4
mov edx, dword [esp + 0x70]
mov ecx, dword [ebx + 0x10]
mov dl, byte [edx]
cmp dl, byte [ecx]
je 0x409b06
add ebp, 1
add ebx, 0x20
cmp ebp, eax
jb 0x409ad0
cmp ebp, eax
je 0x409b0f
call fcn.00408e90
mov eax, dword [esp + 0x1c]
push eax
call sub.MPR.dll_WNetCloseEnum
cmp ebp, dword [esp + 0x18]
jne 0x409b7a
push 0x3a
lea ecx, [esp + 0x50]
call fcn.004088b0
mov edx, dword [esp + 0x70]
lea ecx, [esp + 0x14]
push ecx
push edi
push 2
push edx
call sub.MPR.dll_WNetGetUniversalNameA
cmp eax, 0xea
jne 0x409b6b
push edi
call sub.fbclient.dll_Ordinal_37
mov eax, dword [esp + 0x14]
push eax
call sub.fbclient.dll_Ordinal_1
mov edi, eax
test edi, edi
je 0x409b80
mov edx, dword [esp + 0x70]
lea ecx, [esp + 0x14]
push ecx
push edi
push 2
push edx
call sub.MPR.dll_WNetGetUniversalNameA
test eax, eax
jne 0x409b7a
push edi
mov ebx, esi
call fcn.00409080
add esp, 4
push edi
call sub.fbclient.dll_Ordinal_37
mov dword [esp + 0x84], 0xffffffff
lea ecx, [esp + 0x4c]
call fcn.004011b0
mov ecx, dword [esp + 0x7c]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebp
pop ebx
mov ecx, dword [esp + 0x64]
xor ecx, esp
call fcn.0041b1f8
add esp, 0x74
ret