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

Disassembly:
sub esp, 0x3c8
push ebx
push esi
push edi
mov ecx, 8
xor eax, eax
lea edi, [esp + 0x38]
mov esi, dword [sym.imp.KERNEL32.DLL_lstrcpyA]
push 0x421e4c
rep stosd dword es:[edi], eax
mov ecx, 8
lea edi, [esp + 0x1c]
rep stosd dword es:[edi], eax
lea eax, [esp + 0x3c]
push eax
call esi
lea ecx, [esp + 0x18]
push str.JDKeyARM
push ecx
call esi
lea edx, [esp + 0x38]
push edx
call fcn.0040d060
lea eax, [esp + 0x1c]
push eax
call fcn.0040d060
mov ecx, 0x40
xor eax, eax
lea edi, [esp + 0x1d8]
lea edx, [esp + 0x40]
rep stosd dword es:[edi], eax
lea ecx, [esp + 0x20]
lea eax, [esp + 0x1d8]
push ecx
push edx
push eax
call fcn.0040d400
add esp, 0x14
xor edi, edi
push 0x12
push edi
push edi
push 0x421e70
call dword [sym.imp.SETUPAPI.dll_SetupDiGetClassDevsA]
mov esi, eax
cmp esi, 0xffffffff
mov dword [esp + 0x14], esi
jne 0x40d535
pop edi
pop esi
xor eax, eax
pop ebx
add esp, 0x3c8
ret
push 0x400
push 0x40
call dword [sym.imp.KERNEL32.DLL_GlobalAlloc]
mov ebx, eax
cmp ebx, edi
jne 0x40d554
pop edi
pop esi
xor eax, eax
pop ebx
add esp, 0x3c8
ret
push ebp
mov ebp, dword [esp + 0x3e0]
mov dword [ebx], 5
mov dword [esp + 0x10], edi
mov dword [esp + 0x14], edi
jmp 0x40d570
mov esi, dword [esp + 0x18]
mov edx, dword [esp + 0x14]
lea ecx, [esp + 0x5c]
push ecx
push edx
push 0x421e70
push 0
push esi
mov dword [esp + 0x70], 0x1c
call dword [sym.imp.SETUPAPI.dll_SetupDiEnumDeviceInterfaces]
test eax, eax
je 0x40d6c6
push 0
push 0
push 0x400
lea eax, [esp + 0x68]
push ebx
push eax
push esi
call dword [sym.imp.SETUPAPI.dll_SetupDiGetDeviceInterfaceDetailA]
test eax, eax
je 0x40d6c6
mov edx, dword [esp + 0x14]
mov ecx, 0x41
xor eax, eax
lea edi, [esp + 0x2d4]
rep stosd dword es:[edi], eax
lea esi, [ebx + 4]
lea ecx, [esp + 0x2d4]
inc edx
push esi
push ecx
mov dword [esp + 0x1c], edx
call dword [sym.imp.KERNEL32.DLL_lstrcpyA]
lea edx, [esp + 0x1d4]
lea eax, [esp + 0x2d4]
push edx
push eax
call dword [sym.imp.SHLWAPI.dll_StrStrIA]
test eax, eax
je 0x40d56c
mov ecx, 0x57
xor eax, eax
lea edi, [esp + 0x78]
push esi
rep stosd dword es:[edi], eax
lea ecx, [esp + 0x8c]
mov dword [esp + 0x7c], 2
push ecx
call dword [sym.imp.KERNEL32.DLL_lstrcpyA]
lea edx, [esp + 0x78]
push edx
call fcn.0040d820
add esp, 4
test eax, eax
jne 0x40d56c
mov eax, dword [esp + 0x3dc]
test eax, eax
je 0x40d64c
cmp eax, dword [esp + 0x198]
jne 0x40d6b3
mov eax, dword [esp + 0x10]
mov edx, dword [0x442b08]
inc eax
mov ecx, 0x57
mov dword [esp + 0x10], eax
lea eax, [edx*8]
sub eax, edx
lea esi, [esp + 0x78]
lea eax, [edx + eax*4]
lea eax, [eax + eax*2]
shl eax, 2
inc edx
lea edi, [eax + 0x42cb00]
mov dword [0x442b08], edx
rep movsd dword es:[edi], dword [esi]
test ebp, ebp
mov dword [eax + 0x42cb08], 0
je 0x40d6b3
push 0x28
push ebp
call dword [sym.imp.KERNEL32.DLL_IsBadWritePtr]
test eax, eax
jne 0x40d6b3
mov ecx, 0xa
lea esi, [esp + 0x18c]
mov edi, ebp
add ebp, 0x28
rep movsd dword es:[edi], dword [esi]
mov ecx, dword [esp + 0x80]
push ecx
call dword [sym.imp.KERNEL32.DLL_CloseHandle]
jmp 0x40d56c
push ebx
call dword [sym.imp.KERNEL32.DLL_GlobalFree]
push esi
call dword [sym.imp.SETUPAPI.dll_SetupDiDestroyDeviceInfoList]
mov eax, dword [esp + 0x10]
mov edx, dword [esp + 0x3e4]
xor ecx, ecx
pop ebp
test eax, eax
setle cl
dec ecx
pop edi
and ecx, 0x7fffffff
mov dword [edx], eax
add ecx, 0x80000001
pop esi
mov eax, ecx
pop ebx
add esp, 0x3c8
ret