Function at 0x5108f0
Capabilities:
Query environment variable

Disassembly:
push ebp
push edi
push esi
push ebx
xor esi, esi
xor ebx, ebx
sub esp, 0x6c
mov ebp, dword [esp + 0x8c]
call sub.msvcrt.dll__errno
mov eax, dword [eax]
mov dword [esp], str.PRINTF_EXPONENT_DIGITS
mov dword [esp + 0x3c], 0xffffffff
mov dword [esp + 0x40], 0xffffffff
mov dword [esp + 0x44], 0xfffffffd
mov word [esp + 0x48], bx
mov dword [esp + 0x1c], eax
mov eax, dword [esp + 0x84]
mov dword [esp + 0x4c], 0
mov word [esp + 0x50], si
mov dword [esp + 0x54], 0
mov dword [esp + 0x34], eax
mov eax, dword [esp + 0x80]
and eax, 0x6000
mov dword [esp + 0x18], eax
mov dword [esp + 0x38], eax
mov eax, dword [esp + 0x88]
mov dword [esp + 0x58], eax
call sub.msvcrt.dll_getenv
test eax, eax
je 0x510989
movsx edx, byte [eax]
mov eax, 2
sub edx, 0x30
cmp edx, 2
jbe 0x510996
call 0x519c18
and eax, 1
neg eax
add eax, 3
mov dword [esp + 0x5c], eax
movzx edx, byte [ebp]
nop
movsx eax, dl
lea esi, [ebp + 1]
test eax, eax
je 0x510a40
cmp eax, 0x25
jne 0x510a50
mov eax, dword [esp + 0x18]
movzx edx, byte [ebp + 1]
xor edi, edi
mov dword [esp + 0x40], 0xffffffff
mov dword [esp + 0x3c], 0xffffffff
mov ebx, esi
mov dword [esp + 0x10], 0
mov dword [esp + 0x38], eax
lea eax, [esp + 0x3c]
test dl, dl
mov dword [esp + 0x14], eax
je 0x510a27
lea ecx, [edx - 0x20]
lea ebp, [ebx + 1]
movsx eax, dl
cmp cl, 0x5a
ja case.0x510a00.1
movzx ecx, cl
jmp dword [ecx*4 + 0x61a29c]
movzx edx, byte [ebx + 1]
mov dword [esp + 0x10], 2
mov edi, 4
mov ebx, ebp
test dl, dl
jne 0x5109eb
movsx eax, dl
mov ebp, ebx
test eax, eax
lea esi, [ebp + 1]
jne 0x5109ae
mov esi, esi
lea edi, [edi]
mov eax, dword [esp + 0x54]
add esp, 0x6c
pop ebx
pop esi
pop edi
pop ebp
ret
lea edx, [esp + 0x34]
call fcn.0050f180
movzx edx, byte [ebp + 1]
mov ebp, esi
jmp 0x5109a0
mov edx, dword [esp + 0x10]
mov eax, dword [esp + 0x90]
sub edx, 2
cmp edx, 1
jbe case.0x510a00.51
mov ebx, dword [eax]
add dword [esp + 0x90], 4
test ebx, ebx
je 0x510b67
mov dword [esp], ebx
call sub.msvcrt.dll_strlen
mov edx, eax
lea ecx, [esp + 0x34]
mov eax, ebx
call fcn.0050f300
movzx edx, byte [ebp]
jmp 0x5109a0
test edi, edi
jne 0x510ac2
mov eax, dword [esp + 0x18]
cmp dword [esp + 0x38], eax
je 0x5112cd
mov eax, dword [esp + 0x90]
xor ecx, ecx
mov dword [esp + 0x2c], 0
lea ebx, [eax + 4]
mov eax, dword [eax]
mov dword [esp + 0x28], eax
mov eax, dword [esp + 0x90]
mov edx, dword [eax]
lea eax, [esp + 0x34]
mov dword [esp], eax
mov eax, 0x78
call fcn.0050f7b0
mov dword [esp + 0x90], ebx
jmp 0x510aa2
cmp dword [esp + 0x10], 4
mov eax, dword [esp + 0x90]
mov edx, dword [esp + 0x54]
mov eax, dword [eax]
je 0x511225
cmp dword [esp + 0x10], 1
je 0x511290
cmp dword [esp + 0x10], 2
je 0x51132d
cmp dword [esp + 0x10], 3
mov dword [eax], edx
je 0x5113a2
mov eax, dword [esp + 0x90]
add eax, 4
mov dword [esp + 0x90], eax
jmp 0x510aa2
mov eax, dword [esp + 0x1c]
mov dword [esp], eax
call sub.msvcrt.dll_strerror
test eax, eax
mov ebx, eax
jne 0x510a8d
mov edx, 6
mov ebx, str._null_
jmp 0x510a97
movzx edx, byte [ebx + 1]
cmp dl, 0x6c
je 0x5111a8
mov dword [esp + 0x10], 2
mov edi, 4
mov ebx, ebp
jmp 0x510a23
movzx edx, byte [ebx + 1]
mov dword [esp + 0x10], 3
mov edi, 4
mov ebx, ebp
jmp 0x510a23
mov eax, dword [esp + 0x38]
mov edx, dword [esp + 0x90]
or eax, 0x20
test al, 4
mov dword [esp + 0x38], eax
je 0x510e53
fld xword [edx]
lea eax, [esp + 0x34]
add dword [esp + 0x90], 0xc
fstp xword [esp]
call fcn.005101f0
jmp 0x510aa2
mov eax, dword [esp + 0x38]
mov edx, dword [esp + 0x90]
or eax, 0x20
test al, 4
mov dword [esp + 0x38], eax
je 0x510e83
fld xword [edx]
lea eax, [esp + 0x34]
add dword [esp + 0x90], 0xc
fstp xword [esp]
call fcn.00510110
jmp 0x510aa2
movzx edx, byte [ebx + 1]
cmp dl, 0x68
je 0x51118d
mov dword [esp + 0x10], 1
mov edi, 4
mov ebx, ebp
jmp 0x510a23
mov eax, dword [esp + 0x38]
mov edx, dword [esp + 0x90]
or eax, 0x20
test al, 4
mov dword [esp + 0x38], eax
je 0x510eb3
fld xword [edx]
lea eax, [esp + 0x34]
add dword [esp + 0x90], 0xc
fstp xword [esp]
call fcn.00510060
jmp 0x510aa2
or dword [esp + 0x38], 0x80
cmp dword [esp + 0x10], 3
mov eax, dword [esp + 0x90]
je 0x5111c3
cmp dword [esp + 0x10], 2
je 0x51126d
lea edx, [eax + 4]
mov eax, dword [eax]
mov dword [esp + 0x28], eax
sar eax, 0x1f
cmp dword [esp + 0x10], 1
mov dword [esp + 0x2c], eax
je 0x511311
cmp dword [esp + 0x10], 4
mov dword [esp + 0x90], edx
je 0x51138d
mov eax, dword [esp + 0x28]
mov edx, dword [esp + 0x2c]
lea ecx, [esp + 0x34]
call fcn.0050f4b0
jmp 0x510aa2
mov edx, dword [esp + 0x10]
mov eax, dword [esp + 0x90]
mov dword [esp + 0x40], 0xffffffff
sub edx, 2
cmp edx, 1
jbe 0x510ed8
mov eax, dword [eax]
lea ecx, [esp + 0x34]
mov edx, 1
add dword [esp + 0x90], 4
mov byte [esp + 0x28], al
lea eax, [esp + 0x28]
call fcn.0050f300
jmp 0x510aa2
mov eax, dword [esp + 0x38]
mov edx, dword [esp + 0x90]
or eax, 0x20
test al, 4
mov dword [esp + 0x38], eax
je 0x510f23
fld xword [edx]
lea eax, [esp + 0x34]
add dword [esp + 0x90], 0xc
fstp xword [esp]
call fcn.00510380
jmp 0x510aa2
cmp dword [esp + 0x10], 3
mov edi, dword [esp + 0x90]
je 0x511209
cmp dword [esp + 0x10], 2
je 0x5112a9
cmp dword [esp + 0x10], 1
lea edx, [edi + 4]
mov edi, dword [edi]
mov dword [esp + 0x2c], 0
mov dword [esp + 0x28], edi
je 0x511345
cmp dword [esp + 0x10], 4
mov dword [esp + 0x90], edx
je 0x511377
cmp eax, 0x75
je 0x510ce2
lea edi, [esp + 0x34]
mov edx, dword [esp + 0x28]
mov ecx, dword [esp + 0x2c]
mov dword [esp], edi
call fcn.0050f7b0
jmp 0x510aa2
movzx edx, byte [ebx + 1]
or dword [esp + 0x38], 4
mov edi, 4
mov ebx, ebp
jmp 0x510a23
movzx edx, byte [ebx + 1]
cmp dl, 0x36
je 0x5111e6
cmp dl, 0x33
jne 0x510b8d
cmp byte [ebx + 2], 0x32
je 0x5112e1
mov edx, 0x33
mov dword [esp + 0x10], 2
mov edi, 4
mov ebx, ebp
jmp 0x510a23
mov eax, dword [esp + 0x38]
mov edx, dword [esp + 0x90]
test al, 4
jne 0x510bda
fld qword [edx]
lea eax, [esp + 0x34]
add dword [esp + 0x90], 8
fstp xword [esp]
call fcn.005101f0
jmp 0x510aa2
mov eax, dword [esp + 0x38]
mov edx, dword [esp + 0x90]
test al, 4
jne 0x510c0f
fld qword [edx]
lea eax, [esp + 0x34]
add dword [esp + 0x90], 8
fstp xword [esp]
call fcn.00510110
jmp 0x510aa2
mov eax, dword [esp + 0x38]
mov edx, dword [esp + 0x90]
test al, 4
jne 0x510c6b
fld qword [edx]
lea eax, [esp + 0x34]
add dword [esp + 0x90], 8
fstp xword [esp]
call fcn.00510060
jmp 0x510aa2
mov dword [esp + 0x40], 0xffffffff
mov eax, dword [esp + 0x90]
lea ecx, [esp + 0x34]
mov edx, 1
lea ebx, [eax + 4]
mov eax, dword [eax]
mov word [esp + 0x28], ax
lea eax, [esp + 0x28]
call fcn.0050f1e0
mov dword [esp + 0x90], ebx
jmp 0x510aa2
mov eax, dword [esp + 0x38]
mov edx, dword [esp + 0x90]
test al, 4
jne 0x510d5e
fld qword [edx]
lea eax, [esp + 0x34]
add dword [esp + 0x90], 8
fstp xword [esp]
call fcn.00510380
jmp 0x510aa2
test edi, edi
jne 0x511100
movzx edx, byte [ebx + 1]
or dword [esp + 0x38], 0x200
mov ebx, ebp
jmp 0x510a23
cmp edi, 1
jbe 0x51123d
movzx edx, byte [ebx + 1]
mov edi, 4
mov ebx, ebp
jmp 0x510a23
test edi, edi
jne 0x510ffc
movzx edx, byte [ebx + 1]
or dword [esp + 0x38], 0x400
mov ebx, ebp
jmp 0x510a23
test edi, edi
jne 0x510ffc
movzx edx, byte [ebx + 1]
or dword [esp + 0x38], 0x100
mov ebx, ebp
jmp 0x510a23
test edi, edi
jne 0x510ffc
movzx edx, byte [ebx + 1]
or dword [esp + 0x38], 0x800
mov ebx, ebp
jmp 0x510a23
test edi, edi
jne 0x510ffc
movzx edx, byte [ebx + 1]
or dword [esp + 0x38], 0x40
mov ebx, ebp
jmp 0x510a23
test edi, edi
je 0x511138
movzx edx, byte [ebx + 1]
mov ebx, ebp
jmp 0x510a23
lea edx, [esp + 0x34]
call fcn.0050f180
jmp 0x510aa2
mov ecx, dword [esp + 0x14]
test ecx, ecx
je 0x510f69
test edi, 0xfffffffd
jne 0x511120
mov eax, dword [esp + 0x90]
mov edx, dword [esp + 0x14]
lea ecx, [eax + 4]
mov eax, dword [eax]
test eax, eax
mov dword [edx], eax
js 0x511362
movzx edx, byte [ebx + 1]
mov dword [esp + 0x90], ecx
mov ebx, ebp
mov dword [esp + 0x14], 0
jmp 0x510a23
sub edx, 0x30
cmp dl, 9
ja 0x5112fc
cmp edi, 3
ja 0x5112fc
test edi, edi
jne 0x511109
mov edi, 1
mov edx, dword [esp + 0x14]
test edx, edx
je 0x510ffc
mov ecx, dword [esp + 0x14]
mov edx, dword [ecx]
test edx, edx
js 0x51125d
lea edx, [edx + edx*4]
mov ecx, dword [esp + 0x14]
lea eax, [eax + edx*2 - 0x30]
movzx edx, byte [ebx + 1]
mov dword [ecx], eax
jmp 0x511000
mov eax, dword [esp + 0x90]
mov ebx, dword [eax]
lea esi, [eax + 4]
mov eax, 0x61a270
test ebx, ebx
cmove ebx, eax
mov dword [esp], ebx
call sub.msvcrt.dll_wcslen
lea ecx, [esp + 0x34]
mov edx, eax
mov eax, ebx
call fcn.0050f1e0
mov dword [esp + 0x90], esi
jmp 0x510aa2
cmp edi, 3
ja 0x5112fc
cmp edi, 2
mov edx, 3
cmove edi, edx
jmp 0x511092
movzx edx, byte [ebx + 1]
mov dword [esp + 0x14], 0
mov edi, 4
mov ebx, ebp
jmp 0x510a23
or dword [esp + 0x38], 0x1000
mov dword [esp + 0x28], 0
call sub.msvcrt.dll_localeconv
lea ecx, [esp + 0x28]
mov dword [esp + 8], 0x10
mov dword [esp + 0xc], ecx
mov eax, dword [eax + 4]
mov dword [esp + 4], eax
lea eax, [esp + 0x26]
mov dword [esp], eax
call fcn.0050ee70
test eax, eax
jle 0x51117e
movzx edx, word [esp + 0x26]
mov word [esp + 0x50], dx
movzx edx, byte [ebx + 1]
mov dword [esp + 0x4c], eax
mov ebx, ebp
jmp 0x510a23
lea ebp, [ebx + 2]
movzx edx, byte [ebx + 2]
mov dword [esp + 0x10], 4
mov edi, 4
mov ebx, ebp
jmp 0x510a23
lea ebp, [ebx + 2]
movzx edx, byte [ebx + 2]
mov dword [esp + 0x10], 3
mov edi, 4
mov ebx, ebp
jmp 0x510a23
mov edx, dword [eax + 4]
mov eax, dword [eax]
mov dword [esp + 0x28], eax
mov eax, dword [esp + 0x90]
mov dword [esp + 0x2c], edx
add eax, 8
mov dword [esp + 0x90], eax
jmp 0x510ce2
cmp byte [ebx + 2], 0x34
je 0x5113c0
mov edx, 0x36
mov dword [esp + 0x10], 2
mov edi, 4
mov ebx, ebp
jmp 0x510a23
mov ecx, dword [edi]
mov ebx, dword [edi + 4]
add edi, 8
mov dword [esp + 0x90], edi
mov dword [esp + 0x28], ecx
mov dword [esp + 0x2c], ebx
jmp 0x510dcb
mov byte [eax], dl
mov eax, dword [esp + 0x90]
add eax, 4
mov dword [esp + 0x90], eax
jmp 0x510aa2
lea eax, [esp + 0x40]
movzx edx, byte [ebx + 1]
mov dword [esp + 0x40], 0
mov edi, 2
mov ebx, ebp
mov dword [esp + 0x14], eax
jmp 0x510a23
sub eax, 0x30
movzx edx, byte [ebx + 1]
mov ebx, ebp
mov dword [ecx], eax
jmp 0x510a23
mov eax, dword [eax]
mov dword [esp + 0x28], eax
sar eax, 0x1f
mov dword [esp + 0x2c], eax
mov eax, dword [esp + 0x90]
add eax, 4
mov dword [esp + 0x90], eax
jmp 0x510ce2
mov word [eax], dx
mov eax, dword [esp + 0x90]
add eax, 4
mov dword [esp + 0x90], eax
jmp 0x510aa2
mov edi, dword [edi]
mov dword [esp + 0x2c], 0
mov dword [esp + 0x28], edi
mov edi, dword [esp + 0x90]
add edi, 4
mov dword [esp + 0x90], edi
jmp 0x510dcb
or ah, 2
mov dword [esp + 0x40], 8
mov dword [esp + 0x38], eax
jmp 0x510ac2
lea ebp, [ebx + 3]
movzx edx, byte [ebx + 3]
mov dword [esp + 0x10], 2
mov edi, 4
mov ebx, ebp
jmp 0x510a23
lea edx, [esp + 0x34]
mov eax, 0x25
mov ebp, esi
call fcn.0050f180
jmp 0x510aa2
movsx eax, word [esp + 0x28]
mov dword [esp + 0x90], edx
mov dword [esp + 0x28], eax
sar eax, 0x1f
mov dword [esp + 0x2c], eax
jmp 0x510ce2
mov dword [eax], edx
mov eax, dword [esp + 0x90]
add eax, 4
mov dword [esp + 0x90], eax
jmp 0x510aa2
movzx ecx, word [esp + 0x28]
mov dword [esp + 0x2c], 0
mov dword [esp + 0x90], edx
mov dword [esp + 0x28], ecx
jmp 0x510dcb
test edi, edi
jne 0x5113db
or dword [esp + 0x38], 0x400
neg dword [esp + 0x3c]
jmp 0x511052
movzx edx, byte [esp + 0x28]
mov dword [esp + 0x2c], 0
mov dword [esp + 0x28], edx
jmp 0x510dcb
movsx eax, byte [esp + 0x28]
mov dword [esp + 0x28], eax
sar eax, 0x1f
mov dword [esp + 0x2c], eax
jmp 0x510ce2
mov edi, edx
sar edi, 0x1f
mov dword [eax + 4], edi
mov eax, dword [esp + 0x90]
add eax, 4
mov dword [esp + 0x90], eax
jmp 0x510aa2
lea ebp, [ebx + 3]
movzx edx, byte [ebx + 3]
mov dword [esp + 0x10], 3
mov edi, 4
mov ebx, ebp
jmp 0x510a23
movzx edx, byte [ebx + 1]
mov dword [esp + 0x40], 0xffffffff
mov ebx, ebp
mov dword [esp + 0x90], ecx
mov dword [esp + 0x14], 0
jmp 0x510a23