Function at 0x406d20
Capabilities:
Link many functions at runtime

Disassembly:
push 0xffffffffffffffff
push 0x41d040
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x10
push ebx
push ebp
push esi
push edi
mov ebp, ecx
xor esi, esi
mov dword [esp + 0x28], esi
call fcn.00407200
mov eax, dword [esp + 0x30]
mov dword [ebp + 4], eax
mov eax, dword [esp + 0x40]
cmp eax, esi
jbe 0x406d85
mov cl, byte [esp + 0x38]
sub esp, 0x10
mov edi, esp
mov dword [esp + 0x40], esp
push esi
mov byte [edi], cl
mov ecx, edi
call fcn.004069c0
mov edx, dword [0x41e428]
lea eax, [esp + 0x48]
push edx
push esi
push eax
mov ecx, edi
call fcn.00407350
jmp 0x406de5
mov cl, byte [esp + 0x34]
sub esp, 0x10
mov ebx, esp
mov dword [esp + 0x40], esp
push esi
mov byte [ebx], cl
mov ecx, ebx
call fcn.004069c0
mov edi, str.1251559__hDap_d_V2pvF6l_2i9u5L6mLhMGGYOOrbQ_Lp_7nDRQYZDjYDSjjh.e_
or ecx, 0xffffffff
xor eax, eax
push 1
repne scasb al, byte es:[edi]
not ecx
dec ecx
mov edi, ecx
mov ecx, ebx
push edi
mov dword [esp + 0x48], edi
call fcn.00407690
test al, al
je 0x406de5
mov eax, dword [ebx + 4]
mov ecx, edi
mov edx, ecx
mov esi, str.1251559__hDap_d_V2pvF6l_2i9u5L6mLhMGGYOOrbQ_Lp_7nDRQYZDjYDSjjh.e_
mov edi, eax
mov eax, edx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
push eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov ecx, ebx
call fcn.00407670
xor esi, esi
mov ecx, ebp
call fcn.00407010
mov cl, byte [esp + 0x34]
push esi
mov byte [esp + 0x14], cl
lea ecx, [esp + 0x14]
mov dword [ebp + 0xc], esi
mov dword [ebp + 0x10], esi
mov dword [ebp + 0x14], esi
mov dword [ebp + 0x1c], esi
mov dword [ebp + 0x20], esi
mov dword [ebp + 0x24], esi
call fcn.004069c0
mov edi, 0x475978
or ecx, 0xffffffff
xor eax, eax
push 1
repne scasb al, byte es:[edi]
not ecx
dec ecx
mov ebx, ecx
lea ecx, [esp + 0x14]
push ebx
call fcn.00407690
test al, al
je 0x406e56
mov edi, dword [esp + 0x14]
mov ecx, ebx
mov edx, ecx
mov esi, 0x475978
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
push ebx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
lea ecx, [esp + 0x14]
call fcn.00407670
xor esi, esi
mov edi, dword [esp + 0x34]
mov byte [esp + 0x28], 1
cmp edi, esi
je 0x406ea3
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
dec ecx
push 1
mov ebx, ecx
lea ecx, [esp + 0x14]
push ebx
call fcn.00407690
test al, al
je 0x406ea3
mov esi, dword [esp + 0x34]
mov edi, dword [esp + 0x14]
mov ecx, ebx
push ebx
mov eax, ecx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
lea ecx, [esp + 0x14]
call fcn.00407670
xor esi, esi
cmp dword [esp + 0x18], esi
ja 0x406eef
mov edi, str.KeyCodeDll.dll
or ecx, 0xffffffff
xor eax, eax
push 1
repne scasb al, byte es:[edi]
not ecx
dec ecx
mov ebx, ecx
lea ecx, [esp + 0x14]
push ebx
call fcn.00407690
test al, al
je 0x406eef
mov edi, dword [esp + 0x14]
mov ecx, ebx
mov edx, ecx
mov esi, str.KeyCodeDll.dll
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
push ebx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
lea ecx, [esp + 0x14]
call fcn.00407670
xor esi, esi
mov eax, dword [esp + 0x14]
cmp eax, esi
jne 0x406efc
mov eax, 0x41e430
push eax
call dword [sym.imp.KERNEL32.dll_LoadLibraryA]
cmp eax, esi
mov dword [ebp + 0x24], eax
jne 0x406f4c
push 1
lea ecx, [esp + 0x14]
mov byte [esp + 0x2c], 0
call fcn.004069c0
mov ecx, dword [esp + 0x3c]
cmp ecx, esi
je 0x406f44
mov al, byte [ecx - 1]
test al, al
je 0x406f3a
cmp al, 0xff
je 0x406f3a
dec al
mov byte [ecx - 1], al
or eax, 0xffffffff
jmp 0x406ffb
dec ecx
push ecx
call fcn.0041720c
add esp, 4
or eax, 0xffffffff
jmp 0x406ffb
mov esi, dword [sym.imp.KERNEL32.dll_GetProcAddress]
push str.IInitKeyCode
push eax
call esi
mov dword [ebp + 0xc], eax
mov eax, dword [ebp + 0x24]
push str.IFreeKeyCode
push eax
call esi
mov ecx, dword [ebp + 0x24]
push str.IGetCode
push ecx
mov dword [ebp + 0x10], eax
call esi
mov edx, dword [ebp + 0x24]
push str.IGetCodeFromStreamBuffer
push edx
mov dword [ebp + 0x14], eax
call esi
mov dword [ebp + 0x1c], eax
mov eax, dword [ebp + 0x24]
push 0x42c678
push eax
call esi
mov ecx, ebp
mov dword [ebp + 0x18], eax
mov dword [ebp + 8], 0xffffffff
call fcn.004071d0
mov ecx, dword [esp + 0x14]
xor esi, esi
cmp ecx, esi
je 0x406fc9
mov al, byte [ecx - 1]
test al, al
je 0x406fbf
cmp al, 0xff
je 0x406fbf
dec al
mov byte [ecx - 1], al
jmp 0x406fc9
dec ecx
push ecx
call fcn.0041720c
add esp, 4
mov ecx, dword [esp + 0x3c]
mov dword [esp + 0x14], esi
cmp ecx, esi
mov dword [esp + 0x18], esi
mov dword [esp + 0x1c], esi
je 0x406ff9
mov al, byte [ecx - 1]
test al, al
je 0x406fef
cmp al, 0xff
je 0x406fef
dec al
mov byte [ecx - 1], al
jmp 0x406ff9
dec ecx
push ecx
call fcn.0041720c
add esp, 4
xor eax, eax
mov ecx, dword [esp + 0x20]
pop edi
pop esi
pop ebp
mov dword fs:[0], ecx
pop ebx
add esp, 0x1c
ret 0x18