Function at 0x1004d2a
Capabilities:
Link many functions at runtime

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x244
mov eax, dword [0x1009f7c]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 0xc]
push ebx
xor ebx, ebx
cmp eax, ebx
mov dword [ebp - 0x22c], eax
jne 0x1004d59
mov eax, 0x80070057
jmp 0x10050c3
push esi
push 0x208
lea eax, [ebp - 0x20e]
push ebx
push eax
mov dword [ebp - 0x214], ebx
mov dword [ebp - 0x21c], ebx
mov dword [ebp - 0x220], ebx
mov dword [ebp - 0x234], ebx
mov dword [ebp - 0x238], ebx
mov dword [ebp - 0x228], ebx
mov dword [ebp - 0x218], ebx
mov word [ebp - 0x210], bx
call fcn.01006f30
push 0x1001c88
mov dword [ebp - 0x244], 0x105
call fcn.01004c5e
add esp, 0x10
cmp eax, ebx
mov dword [ebp - 0x230], eax
jne 0x1004dcf
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp - 0x214], eax
jmp 0x1005072
mov esi, dword [sym.imp.KERNEL32.dll_GetProcAddress]
push edi
push 0x1001c74
push eax
call esi
mov edi, eax
cmp edi, ebx
jne 0x1004df5
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp - 0x214], eax
jmp 0x1005071
push 0x1001c58
call fcn.01004c5e
mov dword [esp], 0x1001c48
push eax
mov dword [ebp - 0x220], eax
call esi
mov ebx, eax
test ebx, ebx
jne 0x1004e26
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp - 0x214], eax
jmp 0x100506f
push 0x1001c34
push dword [ebp - 0x220]
call esi
mov dword [ebp - 0x234], eax
lea eax, [ebp - 0x244]
push eax
lea eax, [ebp - 0x210]
push eax
push 4
call edi
test eax, eax
jne 0x1004e5b
mov eax, dword [ebp - 0x22c]
and word [eax], 0
jmp 0x1004e15
lea eax, [ebp - 0x218]
push eax
push 0x80000000
xor edi, edi
push edi
push edi
push edi
push edi
call ebx
test eax, eax
je 0x1004e82
mov dword [ebp - 0x214], 0x80004005
jmp 0x100506f
mov eax, dword [ebp - 0x218]
mov eax, dword [eax + 0x1c]
lea edx, [eax + 2]
mov cx, word [eax]
inc eax
inc eax
cmp cx, di
jne 0x1004e8e
sub eax, edx
sar eax, 1
mov ecx, eax
lea eax, [ebp - 0x210]
lea edx, [eax + 2]
mov di, word [eax]
inc eax
inc eax
test di, di
jne 0x1004ea7
sub eax, edx
sar eax, 1
lea edi, [eax + ecx + 3]
xor ecx, ecx
push 2
pop edx
mov eax, edi
mul edx
seto cl
neg ecx
or ecx, eax
push ecx
call fcn.01006f48
mov ebx, eax
test ebx, ebx
pop ecx
mov dword [ebp - 0x224], ebx
jne 0x1004eeb
mov dword [ebp - 0x214], 0x8007000e
jmp 0x100505a
mov eax, dword [ebp - 0x218]
push dword [eax + 0x1c]
push edi
push ebx
call fcn.01002bd6
push 0x1001334
push edi
push ebx
call fcn.01002ebb
lea eax, [ebp - 0x210]
push eax
push edi
push ebx
call fcn.01002ebb
push 0x1001c30
push edi
push ebx
call fcn.01002ebb
mov eax, dword [ebp + 8]
dec eax
je 0x1004f59
dec eax
jne 0x1004f4a
cmp edi, dword [ebp + 0x10]
ja 0x1004f4a
push ebx
push dword [ebp + 0x10]
push dword [ebp - 0x22c]
call fcn.01002bd6
and dword [ebp - 0x214], 0
jmp 0x100505a
mov dword [ebp - 0x214], 0x80070057
jmp 0x100505a
push 0x1001c18
call fcn.01004c5e
mov ebx, eax
test ebx, ebx
pop ecx
mov dword [ebp - 0x21c], ebx
jne 0x1004f81
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp - 0x214], eax
jmp 0x100505a
push 0x1001c08
push ebx
call esi
push 0x1001bf8
push ebx
mov edi, eax
call esi
push 0x1001be4
push dword [ebp - 0x21c]
mov ebx, eax
call esi
mov dword [ebp - 0x240], eax
lea eax, [ebp - 0x238]
push eax
mov eax, dword [ebp - 0x218]
xor esi, esi
push esi
push esi
push esi
push dword [eax]
call edi
test eax, eax
jne 0x1005050
mov eax, dword [ebp - 0x224]
mov dword [ebp - 0x23c], eax
lea eax, [ebp - 0x228]
push eax
lea eax, [ebp - 0x23c]
push eax
push 1
push 1
push 2
push esi
push dword [ebp - 0x238]
call ebx
test eax, eax
jne 0x1005050
mov edi, dword [ebp - 0x228]
cmp edi, esi
je 0x1005050
cmp dword [edi], 1
jb 0x1005050
mov eax, dword [edi + 4]
cmp dword [eax], 5
je 0x1005047
mov edx, dword [eax + 8]
mov eax, edx
lea esi, [eax + 2]
mov cx, word [eax]
inc eax
inc eax
test cx, cx
jne 0x1005012
sub eax, esi
sar eax, 1
inc eax
cmp eax, dword [ebp + 0x10]
ja 0x100503d
push edx
push dword [ebp + 0x10]
push dword [ebp - 0x22c]
call fcn.01002bd6
mov edi, dword [ebp - 0x228]
jmp 0x1005047
mov dword [ebp - 0x214], 0x80070057
push edi
call dword [ebp - 0x240]
jmp 0x100505a
mov dword [ebp - 0x214], 0x80004005
cmp dword [ebp - 0x224], 0
je 0x100506f
push dword [ebp - 0x224]
call fcn.01006f3c
pop ecx
xor ebx, ebx
pop edi
cmp dword [ebp - 0x218], ebx
je 0x1005086
push dword [ebp - 0x218]
call dword [ebp - 0x234]
cmp dword [ebp - 0x230], ebx
mov esi, dword [sym.imp.KERNEL32.dll_FreeLibrary]
je 0x100509c
push dword [ebp - 0x230]
call esi
cmp dword [ebp - 0x21c], ebx
je 0x10050ac
push dword [ebp - 0x21c]
call esi
cmp dword [ebp - 0x220], ebx
je 0x10050bc
push dword [ebp - 0x220]
call esi
mov eax, dword [ebp - 0x214]
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
pop ebx
call fcn.01006b3a
leave
ret