Function at 0x408fd1
Capabilities:
Resolve function by parsing pe exports

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
push 0xffffffffffffffff
push 0x535194
mov eax, dword fs:[0]
push eax
sub esp, 0x80
mov eax, dword [0x588710]
xor eax, esp
mov dword [esp + 0x78], eax
push ebx
push esi
push edi
mov eax, dword [0x588710]
xor eax, esp
push eax
lea eax, [esp + 0x90]
mov dword fs:[0], eax
xor ebx, ebx
cmp dword [ebp + 8], ebx
jne 0x40902b
mov eax, dword [0x59009c]
mov ecx, dword [0x5900bc]
add ecx, eax
cmp ecx, 3
jae 0x40938e
lea ecx, [esp + 0x38]
call fcn.0040e9e0
mov dword [esp + 0x98], ebx
mov eax, dword [eax]
call fcn.0040e9c0
mov dword [esp + 0x1c], eax
or dword [esp + 0x98], 0xffffffff
lea eax, [esp + 0x38]
push eax
call fcn.00405be5
cmp dword [esp + 0x1c], 0xffffffff
je 0x40938e
push ebx
push ebx
push dword [esp + 0x24]
lea eax, [esp + 0x40]
push eax
mov ecx, 0x10000
call fcn.0040e740
add esp, 0x10
xor esi, esi
inc esi
mov dword [esp + 0x98], esi
mov eax, dword [esp + 0x34]
mov ecx, dword [eax + 4]
mov eax, dword [eax]
mov dword [esp + 0x6c], ecx
lea ecx, [esp + 0x5c]
mov dword [esp + 0x5c], ebx
mov dword [esp + 0x60], ebx
mov dword [esp + 0x64], ebx
mov dword [esp + 0x68], eax
mov dword [esp + 0x70], ebx
mov dword [esp + 0x78], ebx
mov dword [esp + 0x7c], ebx
mov byte [esp + 0x80], bl
call fcn.0040ed30
cmp eax, esi
jne 0x409373
lea eax, [esp + 0x20]
push eax
lea eax, [esp + 0x2c]
push eax
lea eax, [esp + 0x1c]
mov dword [esp + 0x30], ebx
mov dword [esp + 0x28], ebx
mov dword [esp + 0x1c], ebx
mov dword [esp + 0x20], ebx
push eax
mov ebx, ecx
call fcn.0040ee40
mov esi, dword [esp + 0x14]
mov edi, dword [esp + 0x18]
mov eax, esi
or eax, edi
je 0x409373
push edi
push esi
push dword [esp + 0x24]
lea eax, [esp + 0x2c]
push eax
push 4
pop ecx
call fcn.0040e740
add esp, 0x10
mov byte [esp + 0x98], 2
mov eax, dword [esp + 0x20]
cmp dword [eax + 4], 4
jne 0x409362
mov eax, dword [eax]
mov ecx, dword [eax]
lea eax, [ecx - 1]
cmp eax, 0x31ffffe
ja 0x409362
push 0
pop ebx
add esi, 4
adc edi, ebx
push edi
push esi
push dword [esp + 0x24]
lea eax, [esp + 0x3c]
push eax
call fcn.0040e740
add esp, 0x10
mov byte [esp + 0x98], 3
mov eax, dword [esp + 0x30]
cmp dword [eax], ebx
je 0x409351
cmp dword [eax + 4], ebx
je 0x409351
mov edi, dword [eax]
mov esi, dword [edi]
push ebx
lea ecx, [esp + 0x60]
mov dword [esp + 0x78], 0xf
call fcn.004029c0
push esi
add edi, 4
push edi
lea ecx, [esp + 0x64]
call fcn.00401ea9
mov byte [esp + 0x98], 4
cmp dword [esp + 0x74], 0x10
mov eax, dword [esp + 0x60]
jae 0x4091af
lea eax, [esp + 0x60]
push dword [esp + 0x70]
lea edi, [esp + 0x18]
push eax
mov dword [esp + 0x1c], ebx
mov dword [esp + 0x20], ebx
call fcn.004019a0
mov byte [esp + 0x98], 5
mov eax, dword [esp + 0x30]
mov ecx, dword [eax + 4]
mov eax, dword [eax]
lea eax, [eax + esi + 4]
push eax
lea eax, [esp + 0x28]
push eax
sub ecx, esi
mov eax, edi
sub ecx, 4
push eax
call fcn.00401a54
mov byte [esp + 0x98], 6
mov eax, dword [esp + 0x24]
cmp dword [eax], ebx
je 0x409301
mov ecx, dword [eax + 4]
cmp ecx, ebx
je 0x409301
xor edi, edi
cmp ecx, ebx
jbe 0x409301
mov ecx, dword [eax]
add ecx, edi
movzx edx, byte [ecx]
movzx esi, byte [ecx + 1]
mov ecx, dword [ecx + 2]
mov dword [esp + 0x28], edx
mov dword [esp + 0x2c], ecx
cmp dword [ebp + 8], ebx
je 0x40923a
cmp edx, dword [ebp + 8]
jne 0x4092f0
mov eax, dword [eax]
cmp esi, ebx
je 0x4092ac
xor ecx, ecx
mov word [esp + 0x44], cx
mov ecx, dword [esp + 0x2c]
shr ecx, 1
push ecx
lea eax, [eax + edi + 6]
push eax
lea esi, [esp + 0x48]
mov dword [esp + 0x60], 7
mov dword [esp + 0x5c], ebx
call fcn.00409a49
mov byte [esp + 0x98], 7
cmp dword [esp + 0x58], 8
mov eax, dword [esp + 0x44]
jae 0x40927f
lea eax, [esp + 0x44]
push eax
lea eax, [esp + 0x2c]
push eax
mov ebx, 0x5900a0
call fcn.004097c4
push eax
call fcn.00405f17
mov byte [esp + 0x98], 6
push 0
push 1
lea esi, [esp + 0x48]
call fcn.00401e62
jmp 0x4092ea
push dword [esp + 0x2c]
lea ebx, [eax + edi + 6]
lea eax, [esp + 0x40]
push eax
call fcn.0040f030
pop ecx
pop ecx
mov byte [esp + 0x98], 8
push eax
lea ecx, [esp + 0x2c]
call fcn.00409648
mov ebx, eax
call fcn.004098e7
mov byte [esp + 0x98], 6
lea ebx, [esp + 0x3c]
call fcn.00401b59
mov eax, dword [esp + 0x24]
xor ebx, ebx
mov ecx, dword [esp + 0x2c]
lea edi, [edi + ecx + 6]
cmp edi, dword [eax + 4]
jb 0x409216
mov byte [esp + 0x98], 5
lea ebx, [esp + 0x24]
call fcn.00401b59
mov byte [esp + 0x98], 4
xor esi, esi
cmp dword [esp + 0x18], esi
je 0x40932c
push dword [esp + 0x18]
call dword [sym.imp.ADVAPI32.dll_CryptDestroyKey]
cmp dword [esp + 0x14], esi
je 0x40933d
push esi
push dword [esp + 0x18]
call dword [sym.imp.ADVAPI32.dll_CryptReleaseContext]
mov byte [esp + 0x98], 3
push esi
push 1
lea ecx, [esp + 0x64]
call fcn.004029dc
mov byte [esp + 0x98], 2
lea ebx, [esp + 0x30]
call fcn.00401b59
mov byte [esp + 0x98], 1
lea ebx, [esp + 0x20]
call fcn.00401b59
push dword [esp + 0x1c]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
or dword [esp + 0x98], 0xffffffff
lea ebx, [esp + 0x34]
call fcn.00401b59
mov ecx, dword [esp + 0x90]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x78]
xor ecx, esp
call fcn.0050be6b
mov esp, ebp
pop ebp
ret 4