Function at 0x40af6f
Capabilities:
Link many functions at runtime

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x278
mov eax, dword [0x4100a4]
xor eax, ebp
mov dword [ebp - 8], eax
push ebx
mov ebx, dword [ebp + 8]
push esi
mov esi, ecx
mov dword [ebp - 0x22c], edx
push edi
lea ecx, [ebp - 0x228]
mov dword [ebp - 0x230], ebx
call fcn.004067af
mov eax, dword [0x410048]
cmp eax, 0x410048
je 0x40afc9
test byte [eax + 0x44], 1
je 0x40afc9
cmp byte [eax + 0x41], 7
jb 0x40afc9
push dword [eax + 0x3c]
push dword [eax + 0x38]
push 0x11
pop ecx
call fcn.0040a65d
and dword [ebx], 0
mov ecx, esi
call fcn.0040790c
cmp eax, 4
mov ecx, esi
lea eax, [ebp - 0x228]
push eax
jne 0x40b070
push 0
call fcn.0040775d
mov esi, eax
test esi, esi
js 0x40b077
lea ecx, [ebp - 0x228]
call fcn.0040b7dd
cmp eax, 3
jl 0x40b069
mov eax, dword [ebp - 0x228]
push 0x5c
pop ebx
cmp word [eax], bx
jne 0x40b069
cmp word [eax + 2], bx
jne 0x40b069
push 2
pop edi
lea ecx, [ebp - 0x228]
call fcn.00406d2f
cmp eax, edi
jl 0x40b077
mov eax, dword [ebp - 0x228]
cmp bx, word [eax + edi*2]
je 0x40b04a
lea ecx, [ebp - 0x228]
inc edi
call fcn.00406d2f
cmp edi, eax
jle 0x40b02c
jmp 0x40b077
xor ecx, ecx
mov word [eax + edi*2], cx
lea ecx, [ebp - 0x228]
mov eax, dword [ebp - 0x228]
add eax, 4
push 0xffffffffffffffff
push eax
call fcn.004068ca
jmp 0x40b075
mov esi, 0x80070057
jmp 0x40b077
call fcn.00407c44
mov esi, eax
mov eax, dword [0x410048]
cmp eax, 0x410048
je 0x40b0a5
test byte [eax + 0x44], 1
je 0x40b0a5
cmp byte [eax + 0x41], 7
jb 0x40b0a5
push dword [ebp - 0x228]
push dword [eax + 0x3c]
push dword [eax + 0x38]
call fcn.0040a736
mov eax, dword [0x410048]
test esi, esi
js 0x40b60b
push 0x402978
call dword [sym.imp.KERNEL32.dll_LoadLibraryW]
mov ebx, eax
test ebx, ebx
je 0x40b5f1
push 0x402994
push ebx
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
push 0x4029a4
push ebx
mov dword [ebp - 0x238], eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
push 0x4029b4
push ebx
mov dword [ebp - 0x23c], eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
push 0x4029c4
mov esi, eax
push ebx
mov dword [ebp - 0x244], esi
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
push 0x4029d4
mov edi, eax
push ebx
mov dword [ebp - 0x234], edi
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
push 0x4029e4
push ebx
mov dword [ebp - 0x240], eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
cmp dword [ebp - 0x238], 0
mov dword [ebp - 0xc], eax
je 0x40b5d3
test esi, esi
je 0x40b5d3
test edi, edi
je 0x40b5d3
cmp dword [ebp - 0x23c], 0
je 0x40b16e
cmp dword [ebp - 0x240], 0
je 0x40b16e
test eax, eax
je 0x40b16e
mov dword [ebp - 0x21c], 1
jmp 0x40b175
and dword [ebp - 0x21c], 0
push 0x4029f8
call dword [sym.imp.KERNEL32.dll_LoadLibraryW]
mov edi, eax
mov dword [ebp - 0x24c], edi
test edi, edi
je 0x40b5d3
push 0x402a10
push edi
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
push 0x402a1c
push edi
mov esi, eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
push 0x402a28
push edi
mov dword [ebp - 0x248], eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
push 0x402a38
push dword [ebp - 0x24c]
mov edi, eax
mov dword [ebp - 0x250], edi
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
mov dword [ebp - 0x254], eax
test esi, esi
je 0x40b5b0
cmp dword [ebp - 0x248], 0
je 0x40b5b0
test edi, edi
je 0x40b5b0
test eax, eax
je 0x40b5b0
push 0x190
lea eax, [ebp - 0x214]
push 0
push eax
call fcn.0040b7dd
add esp, 0xc
lea eax, [ebp - 0x214]
mov ecx, esi
push eax
push 0x202
call dword [0x411248]
call esi
mov esi, eax
test esi, esi
jne 0x40b5ba
and dword [ebp - 0x218], eax
lea edi, [ebp - 0x274]
mov esi, dword [ebp - 0x21c]
push 8
pop ecx
rep stosd dword es:[edi], eax
test esi, esi
jne 0x40b25b
mov dword [ebp - 0x270], 2
mov edi, dword [ebp - 0x250]
lea eax, [ebp - 0x218]
push eax
lea eax, [ebp - 0x274]
mov ecx, edi
push eax
push 0
push dword [ebp - 0x228]
call dword [0x411248]
call edi
mov ecx, eax
test ecx, ecx
jne 0x40b563
mov eax, dword [ebp - 0x218]
mov eax, dword [eax + 4]
cmp eax, 2
jne 0x40b3cb
mov esi, dword [ebp - 0x238]
mov ecx, esi
call dword [0x411248]
call esi
mov edi, eax
cmp edi, 0xffffffff
je 0x40b364
push dword [ebp - 0x22c]
mov esi, dword [ebp - 0x234]
lea eax, [ebp - 0x34]
push 0x24
push eax
push 0
push 8
lea eax, [ebp - 0x10]
mov ecx, esi
push eax
mov eax, dword [ebp - 0x218]
mov eax, dword [eax + 0x18]
push dword [eax + 4]
push edi
call dword [0x411248]
call esi
test eax, eax
je 0x40b2f1
xor esi, esi
jmp 0x40b34e
mov eax, dword [ebp - 0x230]
mov dword [eax], 1
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov ecx, eax
test ecx, ecx
jg 0x40b30d
mov esi, ecx
jmp 0x40b316
movzx esi, cx
or esi, 0x80070000
test esi, esi
jns 0x40b34e
mov eax, dword [0x410048]
cmp eax, 0x410048
je 0x40b34e
test byte [eax + 0x44], 1
je 0x40b34e
cmp byte [eax + 0x41], 2
jb 0x40b34e
push esi
push ecx
push dword [ebp - 0x22c]
push dword [ebp - 0x228]
push dword [eax + 0x3c]
push dword [eax + 0x38]
push 0x13
pop ecx
call fcn.0040a78e
push edi
mov edi, dword [ebp - 0x244]
mov ecx, edi
call dword [0x411248]
call edi
jmp 0x40b54b
mov eax, dword [ebp - 0x230]
mov dword [eax], 1
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov ecx, eax
test ecx, ecx
jg 0x40b380
mov esi, ecx
jmp 0x40b389
movzx esi, cx
or esi, 0x80070000
test esi, esi
jns 0x40b54b
mov eax, dword [0x410048]
cmp eax, 0x410048
je 0x40b54b
test byte [eax + 0x44], 1
je 0x40b54b
cmp byte [eax + 0x41], 2
jb 0x40b54b
push esi
push ecx
push dword [ebp - 0x228]
push dword [eax + 0x3c]
push dword [eax + 0x38]
push 0x14
pop ecx
jmp 0x40b53f
push 0x17
pop edi
cmp eax, edi
jne 0x40b546
test esi, esi
je 0x40b546
mov esi, dword [ebp - 0x23c]
mov ecx, esi
call dword [0x411248]
call esi
mov esi, eax
mov dword [ebp - 0x234], esi
cmp esi, 0xffffffff
je 0x40b4fa
mov ecx, dword [ebp - 0x218]
lea eax, [ebp - 0x21c]
and dword [ebp - 0x21c], 0
mov edi, dword [ebp - 0xc]
push eax
push dword [ecx + 0x18]
mov ecx, edi
call dword [0x411248]
call edi
push 7
pop ecx
push 0x17
neg eax
lea edi, [ebp - 0x2c]
sbb edx, edx
xor eax, eax
rep stosd dword es:[edi], eax
mov edi, dword [ebp - 0x22c]
xor ecx, ecx
pop eax
push edi
push 0x4c
mov word [ebp - 0x2c], ax
not edx
and edx, dword [ebp - 0x21c]
lea eax, [ebp - 0x84]
push eax
push ecx
push 8
mov dword [ebp - 0x21c], edx
lea eax, [ebp - 0x10]
push eax
mov eax, dword [ebp - 0x218]
and edx, 0xfffffff
or edx, 0x10000000
mov dword [ebp - 0x14], edx
push dword [eax + 0x18]
lea eax, [ebp - 0x2c]
push eax
push ecx
push ecx
push ecx
push esi
mov esi, dword [ebp - 0x240]
mov ecx, esi
call dword [0x411248]
call esi
test eax, eax
je 0x40b497
xor esi, esi
jmp 0x40b4ef
mov eax, dword [ebp - 0x230]
mov dword [eax], 1
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov ecx, eax
test ecx, ecx
jg 0x40b4b3
mov esi, ecx
jmp 0x40b4bc
movzx esi, cx
or esi, 0x80070000
test esi, esi
jns 0x40b4ef
mov eax, dword [0x410048]
cmp eax, 0x410048
je 0x40b4ef
test byte [eax + 0x44], 1
je 0x40b4ef
cmp byte [eax + 0x41], 2
jb 0x40b4ef
push esi
push ecx
push edi
push dword [ebp - 0x228]
push dword [eax + 0x3c]
push dword [eax + 0x38]
push 0x15
pop ecx
call fcn.0040a78e
push dword [ebp - 0x234]
jmp 0x40b34f
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov ecx, eax
test ecx, ecx
jg 0x40b50a
mov esi, ecx
jmp 0x40b513
movzx esi, cx
or esi, 0x80070000
test esi, esi
jns 0x40b54b
mov eax, dword [0x410048]
cmp eax, 0x410048
je 0x40b54b
test byte [eax + 0x44], 1
je 0x40b54b
cmp byte [eax + 0x41], 2
jb 0x40b54b
push esi
push ecx
push dword [ebp - 0x228]
mov ecx, edi
push dword [eax + 0x3c]
push dword [eax + 0x38]
call fcn.0040a7fb
jmp 0x40b54b
mov esi, 0x80004005
push dword [ebp - 0x218]
mov edi, dword [ebp - 0x254]
mov ecx, edi
call dword [0x411248]
call edi
jmp 0x40b59e
jg 0x40b569
mov esi, ecx
jmp 0x40b572
movzx esi, cx
or esi, 0x80070000
test esi, esi
jns 0x40b59e
mov eax, dword [0x410048]
cmp eax, 0x410048
je 0x40b59e
test byte [eax + 0x44], 1
je 0x40b59e
cmp byte [eax + 0x41], 2
jb 0x40b59e
push esi
push ecx
push dword [eax + 0x3c]
push dword [eax + 0x38]
push 0x18
pop ecx
call fcn.0040a708
mov edi, dword [ebp - 0x248]
mov ecx, edi
call dword [0x411248]
call edi
jmp 0x40b5c5
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, eax
test esi, esi
jle 0x40b5c5
movzx esi, si
or esi, 0x80070000
push dword [ebp - 0x24c]
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
jmp 0x40b5e8
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, eax
test esi, esi
jle 0x40b5e8
movzx esi, si
or esi, 0x80070000
push ebx
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
jmp 0x40b606
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, eax
test esi, esi
jle 0x40b606
movzx esi, si
or esi, 0x80070000
mov eax, dword [0x410048]
cmp eax, 0x410048
je 0x40b62c
test byte [eax + 0x44], 1
je 0x40b62c
cmp byte [eax + 0x41], 7
jb 0x40b62c
push dword [eax + 0x3c]
push dword [eax + 0x38]
push 0x19
pop ecx
call fcn.0040a65d
lea ecx, [ebp - 0x228]
call fcn.00406a9c
mov ecx, dword [ebp - 8]
mov eax, esi
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.0040f200
mov esp, ebp
pop ebp
ret 4