Function at 0x4020b0
Capabilities:
Link many functions at runtime

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x264
push esi
push edi
cmp dword [ebp + 0xc], 0
jne 0x4020cb
mov eax, 0x80070057
jmp 0x402577
mov dword [ebp - 0x24], 0
mov dword [ebp - 0x30], 0
mov dword [ebp - 0x2c], 0
mov dword [ebp - 0x14], 0
mov dword [ebp - 0x248], 0
mov dword [ebp - 0x38], 0
mov dword [ebp - 0x34], 0
mov dword [ebp - 0x10], 0
mov dword [ebp - 0xc], 0
mov dword [ebp - 0x20], 0
mov dword [ebp - 4], 0
mov dword [ebp - 0x1c], 0
mov dword [ebp - 0x18], 0
mov dword [ebp - 8], 0
mov word [ebp - 0x244], 0
mov ecx, 0x82
xor eax, eax
lea edi, [ebp - 0x242]
rep stosd dword es:[edi], eax
mov dword [ebp - 0x28], 0x105
push 0x40c14c
call fcn.00402000
add esp, 4
mov dword [ebp - 0x30], eax
cmp dword [ebp - 0x30], 0
jne 0x402173
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp - 0x24], eax
jmp 0x402575
push 0x40c138
mov eax, dword [ebp - 0x30]
push eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
mov dword [ebp - 0x38], eax
cmp dword [ebp - 0x38], 0
jne 0x402199
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp - 0x24], eax
jmp 0x402573
push 0x40c11c
call fcn.00402000
add esp, 4
mov dword [ebp - 0x14], eax
cmp dword [ebp - 0x30], 0
jne 0x4021bd
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp - 0x24], eax
jmp 0x402571
push 0x40c10c
mov ecx, dword [ebp - 0x14]
push ecx
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
mov dword [ebp - 0x248], eax
cmp dword [ebp - 0x248], 0
jne 0x4021e9
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp - 0x24], eax
jmp 0x40256f
push 0x40c0f8
mov edx, dword [ebp - 0x14]
push edx
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
mov dword [ebp - 0x34], eax
cmp dword [ebp - 0x38], 0
jne 0x40220f
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp - 0x24], eax
jmp 0x40256d
lea eax, [ebp - 0x28]
push eax
lea ecx, [ebp - 0x244]
push ecx
push 4
call dword [ebp - 0x38]
test eax, eax
jne 0x402239
mov edx, dword [ebp + 0xc]
mov word [edx], 0
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp - 0x24], eax
jmp 0x40256b
lea eax, [ebp - 0x18]
push eax
push 0x80000000
push 0
push 0
push 0
push 0
call dword [ebp - 0x248]
mov dword [ebp - 0x20], eax
cmp dword [ebp - 0x20], 0
je 0x402265
mov dword [ebp - 0x24], 0x80004005
jmp 0x402569
mov ecx, dword [ebp - 0x18]
mov edx, dword [ecx + 0x1c]
push edx
call sub.MSVCRT.dll_wcslen
add esp, 4
mov esi, eax
lea eax, [ebp - 0x244]
push eax
call sub.MSVCRT.dll_wcslen
add esp, 4
lea ecx, [esi + eax + 3]
mov dword [ebp - 4], ecx
mov edx, dword [ebp - 4]
shl edx, 1
push edx
call sub.MSVCRT.dll_void____cdecl_operator_new_unsigned_int_
add esp, 4
mov dword [ebp - 0x25c], eax
mov eax, dword [ebp - 0x25c]
mov dword [ebp - 8], eax
cmp dword [ebp - 8], 0
jne 0x4022bb
mov dword [ebp - 0x24], 0x8007000e
jmp 0x402567
mov ecx, dword [ebp - 0x18]
mov edx, dword [ecx + 0x1c]
push edx
mov eax, dword [ebp - 8]
push eax
call sub.MSVCRT.dll_wcscpy
add esp, 8
push 0x40c0a4
mov ecx, dword [ebp - 8]
push ecx
call sub.MSVCRT.dll_wcscat
add esp, 8
lea edx, [ebp - 0x244]
push edx
mov eax, dword [ebp - 8]
push eax
call sub.MSVCRT.dll_wcscat
add esp, 8
push 0x40c0f4
mov ecx, dword [ebp - 8]
push ecx
call sub.MSVCRT.dll_wcscat
add esp, 8
mov edx, dword [ebp + 8]
mov dword [ebp - 0x264], edx
cmp dword [ebp - 0x264], 1
je 0x402355
cmp dword [ebp - 0x264], 2
je 0x402323
jmp 0x4024f0
mov eax, dword [ebp - 4]
cmp eax, dword [ebp + 0x10]
ja 0x402344
mov ecx, dword [ebp - 8]
push ecx
mov edx, dword [ebp + 0xc]
push edx
call sub.MSVCRT.dll_wcscpy
add esp, 8
mov dword [ebp - 0x24], 0
jmp 0x402350
mov dword [ebp - 0x24], 0x80070057
jmp 0x402565
jmp 0x4024f7
mov dword [ebp - 0x254], 0
mov dword [ebp - 0x258], 0
mov dword [ebp - 0x250], 0
push 0x40c0dc
call fcn.00402000
add esp, 4
mov dword [ebp - 0x2c], eax
cmp dword [ebp - 0x2c], 0
jne 0x402397
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp - 0x24], eax
jmp 0x402563
push 0x40c0cc
mov eax, dword [ebp - 0x2c]
push eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
mov dword [ebp - 0x254], eax
cmp dword [ebp - 0x248], 0
jne 0x4023c3
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp - 0x24], eax
jmp 0x402561
push 0x40c0bc
mov ecx, dword [ebp - 0x2c]
push ecx
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
mov dword [ebp - 0x258], eax
cmp dword [ebp - 0x248], 0
jne 0x4023ef
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp - 0x24], eax
jmp 0x40255f
push 0x40c0a8
mov edx, dword [ebp - 0x2c]
push edx
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
mov dword [ebp - 0x250], eax
cmp dword [ebp - 0x248], 0
jne 0x40241b
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp - 0x24], eax
jmp 0x40255d
lea eax, [ebp - 0x10]
push eax
push 0
push 0
push 0
mov ecx, dword [ebp - 0x18]
mov edx, dword [ecx]
push edx
call dword [ebp - 0x254]
mov dword [ebp - 0x20], eax
cmp dword [ebp - 0x20], 0
je 0x402446
mov dword [ebp - 0x24], 0x80004005
jmp 0x40255b
mov eax, dword [ebp - 8]
mov dword [ebp - 0x24c], eax
lea ecx, [ebp - 0x1c]
push ecx
lea edx, [ebp - 0x24c]
push edx
push 1
push 1
push 2
push 0
mov eax, dword [ebp - 0x10]
push eax
call dword [ebp - 0x258]
mov dword [ebp - 0x20], eax
cmp dword [ebp - 0x20], 0
je 0x402481
mov dword [ebp - 0x24], 0x80004005
jmp 0x402559
cmp dword [ebp - 0x1c], 0
je 0x4024e5
mov ecx, dword [ebp - 0x1c]
cmp dword [ecx], 1
jb 0x4024e5
mov edx, dword [ebp - 0x1c]
mov eax, dword [edx + 4]
cmp dword [eax], 5
je 0x4024d9
mov ecx, dword [ebp - 0x1c]
mov edx, dword [ecx + 4]
mov eax, dword [edx + 8]
push eax
call sub.MSVCRT.dll_wcslen
add esp, 4
mov dword [ebp - 4], eax
mov ecx, dword [ebp - 4]
add ecx, 1
cmp ecx, dword [ebp + 0x10]
ja 0x4024d2
mov edx, dword [ebp - 0x1c]
mov eax, dword [edx + 4]
mov ecx, dword [eax + 8]
push ecx
mov edx, dword [ebp + 0xc]
push edx
call sub.MSVCRT.dll_wcscpy
add esp, 8
jmp 0x4024d9
mov dword [ebp - 0x24], 0x80070057
mov eax, dword [ebp - 0x1c]
push eax
call dword [ebp - 0x250]
jmp 0x4024ee
mov dword [ebp - 0x24], 0x80004005
jmp 0x402557
jmp 0x4024f7
mov dword [ebp - 0x24], 0x80070057
cmp dword [ebp - 8], 0
je 0x402515
mov ecx, dword [ebp - 8]
mov dword [ebp - 0x260], ecx
mov edx, dword [ebp - 0x260]
push edx
call sub.MSVCRT.dll_void___cdecl_operator_delete_void__
add esp, 4
cmp dword [ebp - 0x18], 0
je 0x402522
mov eax, dword [ebp - 0x18]
push eax
call dword [ebp - 0x34]
cmp dword [ebp - 0x30], 0
je 0x402532
mov ecx, dword [ebp - 0x30]
push ecx
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
cmp dword [ebp - 0x2c], 0
je 0x402542
mov edx, dword [ebp - 0x2c]
push edx
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
cmp dword [ebp - 0x14], 0
je 0x402552
mov eax, dword [ebp - 0x14]
push eax
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
mov eax, dword [ebp - 0x24]
jmp 0x402577
jmp 0x4024f7
jmp 0x4024f7
jmp 0x4024f7
jmp 0x4024f7
jmp 0x4024f7
jmp 0x4024f7
jmp 0x4024f7
jmp 0x4024f7
jmp 0x4024f7
jmp 0x4024f7
jmp 0x4024f7
jmp 0x4024f7
jmp 0x4024f7
jmp 0x4024f7
jmp 0x4024f7
jmp 0x4024f7
pop edi
pop esi
mov esp, ebp
pop ebp
ret