Function at 0x406ba9
Capabilities:
Link many functions at runtime

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x228
mov eax, dword [section..data]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 0xc]
push ebx
mov dword [ebp - 0x224], eax
mov eax, dword [ebp + 0x10]
push esi
xor ebx, ebx
mov esi, ecx
mov dword [ebp - 0x228], eax
mov eax, dword [ebp + 0x14]
push edi
mov dword [ebp - 0x21c], eax
mov dword [ebp - 0x210], ebx
cmp byte [esi], bl
je 0x406bf9
mov dword [ebp - 0x210], 1
jmp 0x406e60
cmp dword [ebp + 8], ebx
je 0x406e56
cmp dword [ebp + 8], 0x20
ja 0x406e56
cmp dword [esi + 0x14], ebx
jne 0x406c6f
mov edi, 0x104
push edi
lea eax, [ebp - 0x20c]
push eax
call dword [sym.imp.KERNEL32.dll_GetSystemWindowsDirectoryW]
test eax, eax
jne 0x406c3b
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, ebx
jg 0x406e3f
jmp 0x406e49
push 0x402388
push edi
lea eax, [ebp - 0x20c]
push eax
call fcn.00406aca
cmp eax, ebx
mov dword [ebp - 0x210], eax
jl 0x406e60
lea eax, [ebp - 0x20c]
push eax
call dword [sym.imp.KERNEL32.dll_LoadLibraryW]
mov dword [esi + 0x14], eax
cmp eax, ebx
je 0x406c28
mov edi, dword [sym.imp.KERNEL32.dll_GetProcAddress]
push 0x402374
push dword [esi + 0x14]
call edi
mov dword [esi + 0x18], eax
cmp eax, ebx
je 0x406c28
push 0x402360
push dword [esi + 0x14]
call edi
mov dword [esi + 0x1c], eax
cmp eax, ebx
je 0x406c28
push 0x402348
push dword [esi + 0x14]
call edi
mov dword [esi + 0x20], eax
cmp eax, ebx
je 0x406c28
push 0x402338
push dword [esi + 0x14]
call edi
mov dword [esi + 0x24], eax
cmp eax, ebx
je 0x406c28
push 0x402320
push dword [esi + 0x14]
call edi
mov dword [ebp - 0x218], eax
cmp eax, ebx
je 0x406c28
push 0x402308
push dword [esi + 0x14]
call edi
mov dword [ebp - 0x220], eax
cmp eax, ebx
je 0x406c28
mov ecx, esi
call fcn.004069e8
mov edi, dword [ebp + 8]
xor ecx, ecx
push 4
pop edx
mov eax, edi
mul edx
seto cl
mov dword [esi + 8], edi
neg ecx
or ecx, eax
push ecx
call sub.msvcrt.dll_void____cdecl_operator_new_unsigned_int_
pop ecx
mov dword [esi + 0xc], eax
cmp eax, ebx
je 0x406d9d
xor eax, eax
cmp dword [esi + 8], ebx
jbe 0x406d2f
mov ecx, dword [esi + 0xc]
mov dword [ecx + eax*4], ebx
inc eax
cmp eax, dword [esi + 8]
jb 0x406d23
mov dword [ebp - 0x214], ebx
cmp dword [esi + 8], ebx
jbe 0x406d7e
mov edi, dword [ebp - 0x214]
mov eax, dword [esi + 0xc]
shl edi, 2
add eax, edi
push eax
push 0x48
call dword [ebp - 0x218]
cmp eax, ebx
jne 0x406c30
mov eax, dword [esi + 0xc]
mov eax, dword [edi + eax]
inc dword [ebp - 0x214]
mov dword [eax + 8], ebx
mov eax, dword [esi + 0xc]
mov edi, dword [edi + eax]
mov eax, dword [ebp - 0x214]
mov dword [edi], ebx
mov dword [edi + 4], ebx
cmp eax, dword [esi + 8]
jb 0x406d3a
mov eax, dword [esi + 8]
xor ecx, ecx
push 4
pop edx
mul edx
seto cl
neg ecx
or ecx, eax
push ecx
call sub.msvcrt.dll_void____cdecl_operator_new_unsigned_int_
pop ecx
mov dword [esi + 0x10], eax
cmp eax, ebx
jne 0x406dac
mov dword [ebp - 0x210], 0x8007000e
jmp 0x406e60
xor eax, eax
cmp dword [esi + 8], ebx
jbe 0x406dbf
mov ecx, dword [esi + 0x10]
mov dword [ecx + eax*4], ebx
inc eax
cmp eax, dword [esi + 8]
jb 0x406db3
mov dword [ebp - 0x214], ebx
cmp dword [esi + 8], ebx
jbe 0x406e11
mov edi, dword [ebp - 0x214]
mov eax, dword [esi + 0x10]
shl edi, 2
add eax, edi
push eax
push 0x100
call dword [ebp - 0x218]
cmp eax, ebx
jne 0x406c30
mov eax, dword [esi + 0x10]
mov eax, dword [edi + eax]
inc dword [ebp - 0x214]
mov dword [eax + 8], ebx
mov eax, dword [esi + 0x10]
mov edi, dword [edi + eax]
mov eax, dword [ebp - 0x214]
mov dword [edi], ebx
mov dword [edi + 4], ebx
cmp eax, dword [esi + 8]
jb 0x406dca
lea eax, [esi + 4]
push eax
push ebx
push 2
push 0x40802c
push dword [ebp + 0x18]
push esi
push dword [ebp - 0x21c]
push dword [ebp - 0x228]
push dword [ebp - 0x224]
call dword [ebp - 0x220]
cmp eax, ebx
je 0x406e51
jle 0x406e49
and eax, 0xffff
or eax, 0x80070000
mov dword [ebp - 0x210], eax
jmp 0x406e60
mov byte [esi], 1
jmp 0x406e60
mov dword [ebp - 0x210], 0x80070057
mov ecx, dword [ebp - 4]
mov eax, dword [ebp - 0x210]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.0040626f
leave
ret 0x14