Function at 0x10057420
Capabilities:
Query environment variable

Disassembly:
push ebp
mov ebp, esp
push ebx
push edi
push esi
sub esp, 0x438
mov edi, dword [ebp + 8]
mov edx, dword [ebp + 0xc]
lea ecx, [ebp - 0x444]
push dword [ebp + 0x10]
call fcn.1007ed60
add esp, 4
mov eax, dword [ebp - 0x444]
test eax, eax
mov dword [ebp - 0x24], eax
je 0x10057548
mov eax, dword [ebp - 0x440]
mov esi, 0x200
mov dword [ebp - 0x34], 2
mov dword [ebp - 0x30], 0
mov dword [ebp - 0x2c], 0
mov dword [ebp - 0x14], 0
mov dword [ebp - 0x20], 2
mov dword [ebp - 0x10], 0
mov dword [ebp - 0x1c], eax
cmp esi, 0x201
jae 0x100574c0
jmp 0x100574ae
jbe 0x1005755c
cmp esi, 0x201
jae 0x100574c0
mov dword [ebp - 0x28], 0x200
lea ebx, [ebp - 0x444]
mov edi, esi
jmp 0x100574f4
mov edi, dword [ebp - 0x14]
mov eax, dword [ebp - 0x10]
sub esi, edi
sub eax, edi
cmp eax, esi
jae 0x100574e5
mov edx, edi
lea ecx, [ebp - 0x34]
push esi
call fcn.1003fa60
add esp, 4
mov eax, dword [ebp - 0x34]
mov edi, dword [ebp - 0x30]
mov dword [ebp - 0x20], eax
mov ebx, dword [ebp - 0x20]
mov dword [ebp - 0x2c], edi
mov dword [ebp - 0x10], edi
mov dword [ebp - 0x28], edi
mov dword [ebp - 0x14], edi
push 0
call sub.KERNEL32.dll_SetLastError
push edi
push ebx
push dword [ebp - 0x24]
call sub.KERNEL32.dll_GetEnvironmentVariableW
mov esi, eax
test eax, eax
jne 0x10057518
call sub.KERNEL32.dll_GetLastError
test eax, eax
jne 0x1005763b
cmp esi, edi
jne 0x100574a0
call sub.KERNEL32.dll_GetLastError
cmp eax, 0x7a
jne 0x10057654
lea esi, [edi + edi]
test edi, edi
mov eax, 0xffffffff
cmovs esi, eax
cmp esi, 0x201
jb 0x100574ae
jmp 0x100574c0
lea ecx, [ebp - 0x444]
call fcn.10037c50
mov byte [edi + 0xc], 2
jmp 0x1005762e
mov eax, dword [ebp - 0x28]
cmp esi, eax
ja 0x1005766a
lea eax, [ebp - 0x44]
push esi
push ebx
push eax
call fcn.10063970
add esp, 0xc
mov ecx, dword [ebp - 0x3c]
movzx edi, word [ebp - 0x37]
movzx edx, byte [ebp - 0x35]
mov esi, dword [ebp - 0x44]
mov eax, dword [ebp - 0x40]
movzx ebx, byte [ebp - 0x38]
mov dword [ebp - 0x10], ecx
mov word [ebp - 0x18], di
mov byte [ebp - 0x16], dl
mov ecx, dword [ebp - 0x14]
test ecx, ecx
je 0x100575af
add ecx, ecx
push 2
push ecx
push dword [ebp - 0x20]
mov edi, eax
call fcn.10004680
mov eax, edi
add esp, 0xc
cmp bl, 2
jne 0x100575f7
mov edi, dword [ebp + 8]
mov ecx, esi
cmp cl, 3
mov byte [edi + 0xc], 2
jne 0x10057617
mov ebx, dword [eax + 4]
mov edi, dword [eax]
mov esi, eax
mov eax, dword [ebx]
push edi
call eax
add esp, 4
mov eax, dword [ebx + 4]
test eax, eax
je 0x100575e5
push dword [ebx + 8]
push eax
push edi
call fcn.10004680
add esp, 0xc
push 4
push 0xc
push esi
call fcn.10004680
add esp, 0xc
mov edi, dword [ebp + 8]
jmp 0x10057617
mov edi, dword [ebp + 8]
movzx ecx, byte [ebp - 0x16]
movzx edx, word [ebp - 0x18]
mov byte [edi + 0xf], cl
mov ecx, dword [ebp - 0x10]
mov word [edi + 0xd], dx
mov dword [edi], esi
mov dword [edi + 4], eax
mov dword [edi + 8], ecx
mov byte [edi + 0xc], bl
mov eax, dword [ebp - 0x1c]
test eax, eax
je 0x1005762e
add eax, eax
push 2
push eax
push dword [ebp - 0x24]
call fcn.10004680
add esp, 0xc
mov eax, edi
add esp, 0x438
pop esi
pop edi
pop ebx
pop ebp
ret
xor esi, esi
mov bl, 2
call sub.KERNEL32.dll_GetLastError
mov ecx, dword [ebp - 0x14]
test ecx, ecx
jne 0x1005759b
jmp 0x100575af
push 0x100de4c0
push 0x28
push 0x100dab04
call fcn.100b0df0
add esp, 0xc
jmp 0x10057679
push 0x100de4b0
push eax
push esi
call fcn.100b6af0
add esp, 0xc
ud2