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

Disassembly:
push 0xffffffffffffffff
push 0x466071
mov eax, dword fs:[0]
push eax
sub esp, 0x98
push ebx
push ebp
push esi
push edi
mov eax, dword [0x478ec8]
xor eax, esp
push eax
lea eax, [esp + 0xac]
mov dword fs:[0], eax
xor esi, esi
mov ebp, vtable.RDDevice.0
push 0x200
mov dword [esp + 0x34], ebp
mov dword [esp + 0x38], esi
mov dword [esp + 0x3c], 0xffffffff
mov dword [esp + 0x44], esi
call fcn.0042ff51
mov edi, dword [sym.imp.KERNEL32.dll_lstrcpyW]
add esp, 4
push 0x46fc50
push eax
mov dword [esp + 0x44], eax
call edi
mov ebx, dword [esp + 0xbc]
lea eax, [esp + 0x30]
push eax
mov dword [esp + 0xb8], esi
call fcn.0040f850
test eax, eax
jne 0x40290d
mov edi, dword [esp + 0xc0]
push 0x46f8b9
push edi
call dword [sym.imp.KERNEL32.dll_lstrcmpA]
test eax, eax
lea esi, [esp + 0x30]
jne 0x4028dc
mov dword [esp + 0xb4], 0xffffffff
mov dword [esp + 0x30], ebp
call fcn.0040fce0
mov ecx, dword [esp + 0x3c]
push ecx
jmp 0x402cae
call fcn.0040f8d0
test eax, eax
jne 0x402907
mov dword [esp + 0xb4], 0xffffffff
lea esi, [esp + 0x30]
mov dword [esp + 0x30], ebp
call fcn.0040fce0
mov edx, dword [esp + 0x3c]
push edx
jmp 0x402cae
mov edi, dword [sym.imp.KERNEL32.dll_lstrcpyW]
push 0xc
push 0
push 0x2d1080
lea ebx, [esp + 0x90]
xor ecx, ecx
lea esi, [esp + 0x3c]
call fcn.0040fd40
test eax, eax
je 0x402ae6
mov bl, 0x41
mov byte [esp + 0x17], 0
mov byte [esp + 0x2c], bl
xor eax, eax
push 0x200
mov dword [esp + 0x1c], ebp
mov dword [esp + 0x20], eax
mov dword [esp + 0x24], 0xffffffff
mov dword [esp + 0x2c], eax
call fcn.0042ff51
add esp, 4
push 0x46fc50
push eax
mov dword [esp + 0x2c], eax
call edi
push ebx
lea ecx, [esp + 0x1c]
mov byte [esp + 0xb8], 1
call fcn.0040fae0
test eax, eax
jne 0x4029aa
push ebx
lea esi, [esp + 0x1c]
call fcn.0040fc20
test eax, eax
jne 0x4029aa
mov byte [esp + 0xb4], al
mov dword [esp + 0x18], ebp
call fcn.0040fce0
mov eax, dword [esp + 0x24]
push eax
call fcn.004410ea
jmp 0x402a11
push 0xc
push 0
push 0x2d1080
lea ebx, [esp + 0x9c]
xor ecx, ecx
lea esi, [esp + 0x24]
call fcn.0040fd40
xor ecx, ecx
cmp eax, ecx
je 0x4029ef
mov edx, dword [esp + 0x94]
cmp edx, dword [esp + 0x88]
jne 0x4029ef
mov eax, dword [esp + 0x98]
cmp eax, dword [esp + 0x8c]
je 0x402a87
mov byte [esp + 0xb4], cl
lea esi, [esp + 0x18]
mov dword [esp + 0x18], ebp
call fcn.0040fce0
mov ecx, dword [esp + 0x24]
push ecx
call fcn.004410ea
mov ebx, dword [esp + 0x30]
add byte [esp + 0x1b], 1
add bl, 1
add esp, 4
cmp bl, 0x5b
mov byte [esp + 0x2c], bl
jl 0x40293b
mov dword [esp + 0xb4], 0xffffffff
mov eax, dword [esp + 0x38]
cmp eax, 0xffffffff
mov esi, 1
je 0x402a4f
test eax, eax
je 0x402a4f
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov esi, eax
mov ebx, dword [esp + 0x3c]
push 0x46fc50
push ebx
call edi
cmp dword [esp + 0x34], 0
je 0x402cad
test esi, esi
jne 0x402cad
lea edi, [esp + 0x9c]
call fcn.00414c30
push 0x474aec
mov eax, edi
push eax
call fcn.00441455
mov al, byte [esp + 0x17]
mov edx, dword [esp + 0xc4]
add al, 0x41
mov byte [esp + 0xb4], cl
lea esi, [esp + 0x18]
mov byte [edx], al
mov dword [esp + 0x18], ebp
call fcn.0040fce0
mov eax, dword [esp + 0x24]
push eax
call fcn.004410ea
mov dword [esp + 0xb8], 0xffffffff
add esp, 4
lea esi, [esp + 0x30]
mov dword [esp + 0x30], ebp
call fcn.0040fce0
mov ecx, dword [esp + 0x3c]
push ecx
call fcn.004410ea
add esp, 4
mov eax, 1
jmp 0x402cb8
xor eax, eax
push 0x20
push eax
push 0x560000
lea ebx, [esp + 0x70]
xor ecx, ecx
lea esi, [esp + 0x3c]
mov dword [esp + 0x70], eax
mov dword [esp + 0x74], eax
mov dword [esp + 0x78], eax
mov dword [esp + 0x7c], eax
mov dword [esp + 0x80], eax
mov dword [esp + 0x84], eax
mov dword [esp + 0x88], eax
mov dword [esp + 0x8c], eax
call fcn.0040fd40
xor edi, edi
cmp eax, edi
je 0x4028e5
mov bl, 0x41
mov byte [esp + 0x17], 0
mov byte [esp + 0x2c], bl
push 0x200
mov dword [esp + 0x1c], ebp
mov dword [esp + 0x20], edi
mov dword [esp + 0x24], 0xffffffff
mov dword [esp + 0x2c], edi
call fcn.0042ff51
add esp, 4
push 0x46fc50
push eax
mov dword [esp + 0x2c], eax
call dword [sym.imp.KERNEL32.dll_lstrcpyW]
push ebx
lea ecx, [esp + 0x1c]
mov byte [esp + 0xb8], 2
call fcn.0040fae0
test eax, eax
jne 0x402bb8
push ebx
lea esi, [esp + 0x1c]
call fcn.0040fc20
cmp eax, edi
jne 0x402bb8
mov byte [esp + 0xb4], 0
mov dword [esp + 0x18], ebp
call fcn.0040fce0
mov eax, dword [esp + 0x24]
push eax
call fcn.004410ea
add esp, 4
jmp 0x402c53
xor eax, eax
push 0x20
push edi
push 0x560000
lea ebx, [esp + 0x50]
xor ecx, ecx
lea esi, [esp + 0x24]
mov dword [esp + 0x50], eax
mov dword [esp + 0x54], eax
mov dword [esp + 0x58], eax
mov dword [esp + 0x5c], eax
mov dword [esp + 0x60], eax
mov dword [esp + 0x64], eax
mov dword [esp + 0x68], eax
mov dword [esp + 0x6c], eax
call fcn.0040fd40
xor ecx, ecx
cmp eax, ecx
je 0x402c2c
mov edx, dword [esp + 0x64]
cmp edx, dword [esp + 0x44]
jne 0x402c2c
mov eax, dword [esp + 0x74]
cmp eax, dword [esp + 0x54]
jne 0x402c2c
mov edx, dword [esp + 0x78]
cmp edx, dword [esp + 0x58]
jne 0x402c2c
mov eax, dword [esp + 0x7c]
cmp eax, dword [esp + 0x5c]
jne 0x402c2c
mov edx, dword [esp + 0x80]
cmp edx, dword [esp + 0x60]
je 0x402c73
mov byte [esp + 0xb4], cl
lea esi, [esp + 0x18]
mov dword [esp + 0x18], ebp
call fcn.0040fce0
mov eax, dword [esp + 0x24]
push eax
call fcn.004410ea
mov ebx, dword [esp + 0x30]
add esp, 4
xor edi, edi
add byte [esp + 0x17], 1
add bl, 1
cmp bl, 0x5b
mov byte [esp + 0x2c], bl
jl 0x402b40
mov edi, dword [sym.imp.KERNEL32.dll_lstrcpyW]
jmp 0x402a29
mov al, byte [esp + 0x17]
mov edx, dword [esp + 0xc4]
add al, 0x41
mov byte [esp + 0xb4], cl
lea ecx, [esp + 0x18]
mov byte [edx], al
call fcn.0040f810
lea ecx, [esp + 0x30]
mov dword [esp + 0xb4], 0xffffffff
call fcn.0040f810
mov eax, 1
jmp 0x402cb8
push ebx
call fcn.004410ea
add esp, 4
xor eax, eax
mov ecx, dword [esp + 0xac]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebp
pop ebx
add esp, 0xa4
ret