Function at 0x413ae0
Capabilities:
Create directory
Get common file path
Query environment variable

Disassembly:
push ebp
mov ebp, esp
push edi
mov edi, edx
push esi
mov esi, eax
push ebx
sub esp, 0x27c
mov dword [esp], str.ANDROID_SDK_HOME
lea ebx, [ebp - 0x220]
call sub.msvcrt.dll_getenv
test eax, eax
mov edx, eax
je 0x413dc0
test byte [0x4f3061], 4
jne 0x413c00
mov dword [esp + 0x10], str..android
mov dword [esp + 0xc], edx
mov dword [esp + 8], 0x4b6d01
mov dword [esp + 4], 0x104
mov dword [esp], ebx
call fcn.0049fc60
cmp eax, 0x103
jg 0x413db0
mov edx, ebx
mov ecx, dword [edx]
add edx, 4
lea eax, [ecx - 0x1010101]
not ecx
and eax, ecx
and eax, 0x80808080
je 0x413b4a
mov ecx, eax
shr ecx, 0x10
test eax, 0x8080
cmove eax, ecx
lea ecx, [edx + 2]
cmove edx, ecx
add al, al
sbb edx, 3
sub edx, ebx
lea eax, [ebp - 0x248]
mov dword [esp + 8], edx
mov dword [esp], eax
mov dword [esp + 4], ebx
call fcn.0041c900
lea eax, [ebp - 0x244]
mov dword [esp + 4], eax
mov eax, dword [ebp - 0x248]
mov dword [esp], eax
call dword [sym.imp.msvcrt.dll__wstat]
test eax, eax
je 0x413bbe
mov dword [esp], ebx
call dword [sym.imp.msvcrt.dll__mkdir]
test eax, eax
js 0x413ce1
mov dword [esp], esi
mov dword [esp + 0x10], str.adbkey
mov dword [esp + 0xc], ebx
mov dword [esp + 8], 0x4b6d01
mov dword [esp + 4], edi
call fcn.0049fc60
mov esi, eax
mov eax, dword [ebp - 0x248]
lea ecx, [eax - 0xc]
cmp ecx, 0x4b0f34
jne 0x413e63
lea esp, [ebp - 0xc]
mov eax, esi
pop ebx
pop esi
pop edi
pop ebp
ret
mov ecx, dword [sym.imp.msvcrt.dll__errno]
mov dword [ebp - 0x268], edx
mov dword [ebp - 0x264], ecx
call ecx
mov eax, dword [eax]
mov dword [esp], 0x4f3068
mov dword [ebp - 0x25c], eax
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
sub esp, 4
call dword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
mov dword [ebp - 0x260], eax
call sub.msvcrt.dll__getpid
mov edx, dword [ebp - 0x260]
mov dword [esp + 8], str.get_user_keyfilepath
mov dword [esp + 4], 0x4b6c8c
mov dword [esp + 0x10], edx
mov edx, dword [sym.imp.msvcrt.dll__iob]
mov dword [esp + 0xc], eax
lea eax, [edx + 0x40]
mov dword [esp], eax
call fcn.0049fc30
mov ecx, dword [ebp - 0x264]
call ecx
mov ecx, dword [ebp - 0x25c]
mov edx, dword [ebp - 0x268]
mov dword [ebp - 0x260], edx
mov dword [eax], ecx
mov dword [esp + 8], edx
mov edx, dword [sym.imp.msvcrt.dll__iob]
mov dword [esp + 4], str.home__s_n
lea eax, [edx + 0x40]
mov dword [esp], eax
call fcn.0049fc30
mov edx, dword [sym.imp.msvcrt.dll__iob]
lea eax, [edx + 0x40]
mov dword [esp], eax
call sub.msvcrt.dll_fflush
mov dword [esp], 0x4f3068
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov ecx, dword [ebp - 0x264]
sub esp, 4
call ecx
mov ecx, dword [ebp - 0x25c]
mov edx, dword [ebp - 0x260]
mov dword [eax], ecx
jmp 0x413b19
test byte [0x4f3061], 4
mov esi, 0xffffffff
je 0x413be0
mov edi, dword [sym.imp.msvcrt.dll__errno]
call edi
mov eax, dword [eax]
mov dword [esp], 0x4f3068
mov dword [ebp - 0x25c], eax
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
sub esp, 4
call dword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
mov dword [ebp - 0x260], eax
call sub.msvcrt.dll__getpid
mov edx, dword [sym.imp.msvcrt.dll__iob]
mov ecx, dword [ebp - 0x260]
mov dword [esp + 8], str.get_user_keyfilepath
mov dword [esp + 4], 0x4b6c8c
mov dword [esp + 0x10], ecx
mov dword [esp + 0xc], eax
lea eax, [edx + 0x40]
mov dword [esp], eax
call fcn.0049fc30
call edi
mov ecx, dword [ebp - 0x25c]
mov dword [eax], ecx
mov dword [esp + 8], ebx
mov ebx, dword [sym.imp.msvcrt.dll__iob]
mov dword [esp + 4], str.Cannot_mkdir__s
lea eax, [ebx + 0x40]
mov dword [esp], eax
call fcn.0049fc30
mov ebx, dword [sym.imp.msvcrt.dll__iob]
lea eax, [ebx + 0x40]
mov dword [esp], eax
call sub.msvcrt.dll_fflush
mov dword [esp], 0x4f3068
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
sub esp, 4
call edi
mov ecx, dword [ebp - 0x25c]
mov dword [eax], ecx
jmp 0x413be0
mov esi, 0xffffffff
jmp 0x413bf5
mov dword [esp + 0x10], ebx
mov dword [esp + 0xc], 0
mov dword [esp + 8], 0
mov dword [esp + 4], 0x28
mov dword [esp], 0
call dword [sym.imp.SHELL32.DLL_SHGetFolderPathW]
lea eax, [ebp - 0x244]
sub esp, 0x14
mov dword [esp], eax
mov dword [esp + 8], 0x104
mov dword [esp + 4], ebx
call fcn.0041cbc0
mov edx, dword [ebp - 0x244]
lea eax, [edx - 0xc]
cmp eax, 0x4b0f44
mov dword [ebp - 0x25c], eax
je 0x413b0c
cmp dword [0x4ac46c], 0
lea eax, [edx - 4]
jne 0x413e9f
mov eax, dword [edx - 4]
lea ecx, [eax - 1]
mov dword [edx - 4], ecx
test eax, eax
jg 0x413b0c
mov ecx, dword [ebp - 0x25c]
lea eax, [ebp - 0x248]
mov dword [esp], eax
mov dword [ebp - 0x260], edx
call fcn.004a5860
push edx
mov edx, dword [ebp - 0x260]
jmp 0x413b0c
cmp dword [0x4ac46c], 0
jne 0x413e93
mov edx, dword [eax - 4]
lea ebx, [edx - 1]
mov dword [eax - 4], ebx
mov eax, edx
test eax, eax
jg 0x413bf5
lea eax, [ebp - 0x249]
mov dword [esp], eax
call fcn.004a31a0
push eax
jmp 0x413bf5
or edx, 0xffffffff
lock xadd dword [eax - 4], edx
mov eax, edx
jmp 0x413e77
or ecx, 0xffffffff
lock xadd dword [eax], ecx
mov eax, ecx
jmp 0x413e35