Function at 0x402590
Capabilities:
Link many functions at runtime

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x270
mov eax, dword [0x410060]
mov dword [ebp - 0xc], eax
push esi
push edi
cmp dword [ebp + 0xc], 0
jne 0x4025b5
mov eax, 0x80070057
jmp 0x402b65
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.00402320
add esp, 4
mov dword [ebp - 0x224], eax
cmp dword [ebp - 0x224], 0
jne 0x40268a
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp - 0x23c], eax
jmp 0x402ae3
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 0x4026bc
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp - 0x23c], eax
jmp 0x402ae3
push str.NETAPI32.DLL
call fcn.00402320
add esp, 4
mov dword [ebp - 0x254], eax
cmp dword [ebp - 0x224], 0
jne 0x4026e9
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp - 0x23c], eax
jmp 0x402ae3
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 0x40271b
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp - 0x23c], eax
jmp 0x402ae3
push 0x40b0d0
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 0x40274d
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp - 0x23c], eax
jmp 0x402ae3
lea eax, [ebp - 4]
push eax
lea ecx, [ebp - 0x220]
push ecx
push 4
call dword [ebp - 0x238]
test eax, eax
jne 0x40277d
mov edx, dword [ebp + 0xc]
mov word [edx], 0
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp - 0x23c], eax
jmp 0x402ae3
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 0x4027b5
mov dword [ebp - 0x23c], 0x80004005
jmp 0x402ae3
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 0x40281d
mov dword [ebp - 0x23c], 0x8007000e
jmp 0x402ae3
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.00402b80
push 0x40b07c
mov edx, dword [ebp - 0x250]
push edx
mov eax, dword [ebp - 0x24c]
push eax
call fcn.00402400
lea ecx, [ebp - 0x220]
push ecx
mov edx, dword [ebp - 0x250]
push edx
mov eax, dword [ebp - 0x24c]
push eax
call fcn.00402400
push 0x40b0cc
mov ecx, dword [ebp - 0x250]
push ecx
mov edx, dword [ebp - 0x24c]
push edx
call fcn.00402400
mov eax, dword [ebp + 8]
mov dword [ebp - 0x270], eax
cmp dword [ebp - 0x270], 1
je 0x4028e3
cmp dword [ebp - 0x270], 2
je 0x4028a4
jmp 0x402ad9
mov ecx, dword [ebp - 0x250]
cmp ecx, dword [ebp + 0x10]
ja 0x4028cf
mov edx, dword [ebp - 0x24c]
push edx
mov eax, dword [ebp + 0x10]
push eax
mov ecx, dword [ebp + 0xc]
push ecx
call fcn.00402b80
mov dword [ebp - 0x23c], 0
jmp 0x4028de
mov dword [ebp - 0x23c], 0x80070057
jmp 0x402ae3
jmp 0x402ae3
mov dword [ebp - 0x258], 0
mov dword [ebp - 0x264], 0
mov dword [ebp - 0x260], 0
push str.ntdsapi.dll
call fcn.00402320
add esp, 4
mov dword [ebp - 0x248], eax
cmp dword [ebp - 0x248], 0
jne 0x40292e
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp - 0x23c], eax
jmp 0x402ae3
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 0x402960
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp - 0x23c], eax
jmp 0x402ae3
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 0x402992
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp - 0x23c], eax
jmp 0x402ae3
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 0x4029c4
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp - 0x23c], eax
jmp 0x402ae3
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 0x4029fe
mov dword [ebp - 0x23c], 0x80004005
jmp 0x402ae3
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 0x402a4b
mov dword [ebp - 0x23c], 0x80004005
jmp 0x402ae3
cmp dword [ebp - 0x240], 0
je 0x402acb
mov eax, dword [ebp - 0x240]
cmp dword [eax], 1
jb 0x402acb
mov ecx, dword [ebp - 0x240]
mov edx, dword [ecx + 4]
cmp dword [edx], 5
je 0x402abc
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 0x402ab2
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.00402b80
jmp 0x402abc
mov dword [ebp - 0x23c], 0x80070057
mov eax, dword [ebp - 0x240]
push eax
call dword [ebp - 0x260]
jmp 0x402ad7
mov dword [ebp - 0x23c], 0x80004005
jmp 0x402ae3
jmp 0x402ae3
mov dword [ebp - 0x23c], 0x80070057
cmp dword [ebp - 0x24c], 0
je 0x402b07
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 0x402b1d
mov eax, dword [ebp - 0x22c]
push eax
call dword [ebp - 0x244]
cmp dword [ebp - 0x224], 0
je 0x402b33
mov ecx, dword [ebp - 0x224]
push ecx
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
cmp dword [ebp - 0x248], 0
je 0x402b49
mov edx, dword [ebp - 0x248]
push edx
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
cmp dword [ebp - 0x254], 0
je 0x402b5f
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.00409559
pop edi
pop esi
mov esp, ebp
pop ebp
ret