Function at 0x401f30
Capabilities:
Link many functions at runtime

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x270
mov eax, dword [0x40feb8]
mov dword [ebp - 0xc], eax
push esi
push edi
cmp dword [ebp + 0xc], 0
jne 0x401f55
mov eax, 0x80070057
jmp 0x402505
mov dword [ebp - 0x23c], 0
mov dword [ebp - 0x224], 0
mov dword [ebp - 0x248], 0
mov dword [ebp - 0x254], 0
mov dword [ebp - 0x234], 0
mov dword [ebp - 0x238], 0
mov dword [ebp - 0x244], 0
mov dword [ebp - 0x228], 0
mov dword [ebp - 8], 0
mov dword [ebp - 0x230], 0
mov dword [ebp - 0x250], 0
mov dword [ebp - 0x240], 0
mov dword [ebp - 0x22c], 0
mov dword [ebp - 0x24c], 0
mov word [ebp - 0x220], 0
mov ecx, 0x82
xor eax, eax
lea edi, [ebp - 0x21e]
rep stosd dword es:[edi], eax
mov dword [ebp - 4], 0x105
push str.kernel32.dll
call fcn.00401cc0
add esp, 4
mov dword [ebp - 0x224], eax
cmp dword [ebp - 0x224], 0
jne 0x40202a
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp - 0x23c], eax
jmp 0x402483
push str.GetComputerNameExW
mov eax, dword [ebp - 0x224]
push eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
mov dword [ebp - 0x238], eax
cmp dword [ebp - 0x238], 0
jne 0x40205c
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp - 0x23c], eax
jmp 0x402483
push str.NETAPI32.DLL
call fcn.00401cc0
add esp, 4
mov dword [ebp - 0x254], eax
cmp dword [ebp - 0x224], 0
jne 0x402089
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp - 0x23c], eax
jmp 0x402483
push str.DsGetDcNameW
mov ecx, dword [ebp - 0x254]
push ecx
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
mov dword [ebp - 0x234], eax
cmp dword [ebp - 0x234], 0
jne 0x4020bb
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp - 0x23c], eax
jmp 0x402483
push 0x40aed4
mov edx, dword [ebp - 0x254]
push edx
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
mov dword [ebp - 0x244], eax
cmp dword [ebp - 0x238], 0
jne 0x4020ed
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp - 0x23c], eax
jmp 0x402483
lea eax, [ebp - 4]
push eax
lea ecx, [ebp - 0x220]
push ecx
push 4
call dword [ebp - 0x238]
test eax, eax
jne 0x40211d
mov edx, dword [ebp + 0xc]
mov word [edx], 0
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp - 0x23c], eax
jmp 0x402483
lea eax, [ebp - 0x22c]
push eax
push 0x80000000
push 0
push 0
push 0
push 0
call dword [ebp - 0x234]
mov dword [ebp - 0x230], eax
cmp dword [ebp - 0x230], 0
je 0x402155
mov dword [ebp - 0x23c], 0x80004005
jmp 0x402483
mov ecx, dword [ebp - 0x22c]
mov edx, dword [ecx + 0x1c]
push edx
call sub.MSVCR71.dll_wcslen
add esp, 4
mov esi, eax
lea eax, [ebp - 0x220]
push eax
call sub.MSVCR71.dll_wcslen
add esp, 4
lea ecx, [esi + eax + 3]
mov dword [ebp - 0x250], ecx
mov edx, dword [ebp - 0x250]
shl edx, 1
push edx
call sub.MSVCR71.dll_void____cdecl_operator_new_unsigned_int_
add esp, 4
mov dword [ebp - 0x268], eax
mov eax, dword [ebp - 0x268]
mov dword [ebp - 0x24c], eax
cmp dword [ebp - 0x24c], 0
jne 0x4021bd
mov dword [ebp - 0x23c], 0x8007000e
jmp 0x402483
mov ecx, dword [ebp - 0x22c]
mov edx, dword [ecx + 0x1c]
push edx
mov eax, dword [ebp - 0x250]
push eax
mov ecx, dword [ebp - 0x24c]
push ecx
call fcn.00402520
push 0x40a4e8
mov edx, dword [ebp - 0x250]
push edx
mov eax, dword [ebp - 0x24c]
push eax
call fcn.00401da0
lea ecx, [ebp - 0x220]
push ecx
mov edx, dword [ebp - 0x250]
push edx
mov eax, dword [ebp - 0x24c]
push eax
call fcn.00401da0
push 0x40aed0
mov ecx, dword [ebp - 0x250]
push ecx
mov edx, dword [ebp - 0x24c]
push edx
call fcn.00401da0
mov eax, dword [ebp + 8]
mov dword [ebp - 0x270], eax
cmp dword [ebp - 0x270], 1
je 0x402283
cmp dword [ebp - 0x270], 2
je 0x402244
jmp 0x402479
mov ecx, dword [ebp - 0x250]
cmp ecx, dword [ebp + 0x10]
ja 0x40226f
mov edx, dword [ebp - 0x24c]
push edx
mov eax, dword [ebp + 0x10]
push eax
mov ecx, dword [ebp + 0xc]
push ecx
call fcn.00402520
mov dword [ebp - 0x23c], 0
jmp 0x40227e
mov dword [ebp - 0x23c], 0x80070057
jmp 0x402483
jmp 0x402483
mov dword [ebp - 0x258], 0
mov dword [ebp - 0x264], 0
mov dword [ebp - 0x260], 0
push str.ntdsapi.dll
call fcn.00401cc0
add esp, 4
mov dword [ebp - 0x248], eax
cmp dword [ebp - 0x248], 0
jne 0x4022ce
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp - 0x23c], eax
jmp 0x402483
push str.DsBindWithSpnW
mov edx, dword [ebp - 0x248]
push edx
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
mov dword [ebp - 0x258], eax
cmp dword [ebp - 0x234], 0
jne 0x402300
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp - 0x23c], eax
jmp 0x402483
push str.DsCrackNamesW
mov eax, dword [ebp - 0x248]
push eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
mov dword [ebp - 0x264], eax
cmp dword [ebp - 0x234], 0
jne 0x402332
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp - 0x23c], eax
jmp 0x402483
push str.DsFreeNameResultW
mov ecx, dword [ebp - 0x248]
push ecx
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
mov dword [ebp - 0x260], eax
cmp dword [ebp - 0x234], 0
jne 0x402364
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp - 0x23c], eax
jmp 0x402483
lea edx, [ebp - 0x228]
push edx
push 0
push 0
push 0
mov eax, dword [ebp - 0x22c]
mov ecx, dword [eax]
push ecx
call dword [ebp - 0x258]
mov dword [ebp - 0x230], eax
cmp dword [ebp - 0x230], 0
je 0x40239e
mov dword [ebp - 0x23c], 0x80004005
jmp 0x402483
mov edx, dword [ebp - 0x24c]
mov dword [ebp - 0x25c], edx
lea eax, [ebp - 0x240]
push eax
lea ecx, [ebp - 0x25c]
push ecx
push 1
push 1
push 2
push 0
mov edx, dword [ebp - 0x228]
push edx
call dword [ebp - 0x264]
mov dword [ebp - 0x230], eax
cmp dword [ebp - 0x230], 0
je 0x4023eb
mov dword [ebp - 0x23c], 0x80004005
jmp 0x402483
cmp dword [ebp - 0x240], 0
je 0x40246b
mov eax, dword [ebp - 0x240]
cmp dword [eax], 1
jb 0x40246b
mov ecx, dword [ebp - 0x240]
mov edx, dword [ecx + 4]
cmp dword [edx], 5
je 0x40245c
mov eax, dword [ebp - 0x240]
mov ecx, dword [eax + 4]
mov edx, dword [ecx + 8]
push edx
call sub.MSVCR71.dll_wcslen
add esp, 4
mov dword [ebp - 0x250], eax
mov eax, dword [ebp - 0x250]
add eax, 1
cmp eax, dword [ebp + 0x10]
ja 0x402452
mov ecx, dword [ebp - 0x240]
mov edx, dword [ecx + 4]
mov eax, dword [edx + 8]
push eax
mov ecx, dword [ebp + 0x10]
push ecx
mov edx, dword [ebp + 0xc]
push edx
call fcn.00402520
jmp 0x40245c
mov dword [ebp - 0x23c], 0x80070057
mov eax, dword [ebp - 0x240]
push eax
call dword [ebp - 0x260]
jmp 0x402477
mov dword [ebp - 0x23c], 0x80004005
jmp 0x402483
jmp 0x402483
mov dword [ebp - 0x23c], 0x80070057
cmp dword [ebp - 0x24c], 0
je 0x4024a7
mov ecx, dword [ebp - 0x24c]
mov dword [ebp - 0x26c], ecx
mov edx, dword [ebp - 0x26c]
push edx
call sub.MSVCR71.dll_void___cdecl_operator_delete_void__
add esp, 4
cmp dword [ebp - 0x22c], 0
je 0x4024bd
mov eax, dword [ebp - 0x22c]
push eax
call dword [ebp - 0x244]
cmp dword [ebp - 0x224], 0
je 0x4024d3
mov ecx, dword [ebp - 0x224]
push ecx
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
cmp dword [ebp - 0x248], 0
je 0x4024e9
mov edx, dword [ebp - 0x248]
push edx
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
cmp dword [ebp - 0x254], 0
je 0x4024ff
mov eax, dword [ebp - 0x254]
push eax
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
mov eax, dword [ebp - 0x23c]
mov ecx, dword [ebp - 0xc]
call fcn.00408ef1
pop edi
pop esi
mov esp, ebp
pop ebp
ret