Function at 0x40d5f0
Capabilities:
Query environment variable

Disassembly:
push ebp
mov ebp, 0xfffffffd
push edi
xor edi, edi
push esi
push ebx
sub esp, 0xac
mov eax, dword [esp + 0xc4]
and dword [esp + 0xc0], 0x3000
mov ebx, dword [esp + 0xcc]
mov dword [esp + 0x40], eax
mov eax, dword [esp + 0xc0]
mov dword [esp + 0x50], ebp
mov word [esp + 0x54], 0
mov dword [esp + 0x44], eax
mov eax, 0xffffffff
mov dword [esp + 0x48], eax
mov eax, 0xffffffff
mov dword [esp + 0x4c], eax
mov eax, dword [esp + 0xc8]
mov dword [esp + 0x58], edi
mov dword [esp], str.PRINTF_EXPONENT_DIGITS
mov dword [esp + 0x5c], eax
call sub.msvcrt.dll_getenv
test eax, eax
je 0x40d738
movsx eax, byte [eax]
sub eax, 0x30
cmp eax, 2
ja 0x40d738
mov edx, 2
mov dword [esp + 0x60], edx
mov eax, dword [esp + 0x40]
mov dword [esp + 0x90], edx
mov dword [esp + 0x70], eax
mov eax, dword [esp + 0x44]
mov dword [esp + 0x74], eax
mov eax, dword [esp + 0x48]
mov dword [esp + 0x78], eax
mov eax, dword [esp + 0x4c]
mov dword [esp + 0x7c], eax
mov eax, dword [esp + 0x50]
mov dword [esp + 0x80], eax
mov eax, dword [esp + 0x54]
mov dword [esp + 0x84], eax
mov eax, dword [esp + 0x58]
mov dword [esp + 0x88], eax
mov eax, dword [esp + 0x5c]
mov dword [esp + 0x8c], eax
lea esi, [esi]
lea edi, [edi]
movsx ecx, byte [ebx]
inc ebx
test ecx, ecx
je 0x40d7a1
lea esi, [esi]
cmp ecx, 0x25
jne 0x40d787
mov eax, dword [esp + 0xc0]
mov ecx, 0xffffffff
mov edx, 0xffffffff
mov dword [esp + 0x7c], ecx
xor esi, esi
xor edi, edi
mov dword [esp + 0x78], edx
lea ebp, [esp + 0x78]
mov dword [esp + 0x74], eax
movzx eax, byte [ebx]
test al, al
je 0x40d795
movsx ecx, al
inc ebx
lea eax, [ecx - 0x20]
cmp eax, 0x5a
ja case.0x40d731.33
jmp dword [eax*4 + 0x418e0c]
call fcn.00410c18
test al, 1
mov edx, 3
je 0x40d67d
jmp 0x40d678
cmp esi, 3
setbe al
xor edx, edx
cmp ecx, 0x39
setle dl
test edx, eax
je 0x40d7c0
cmp ecx, 0x2f
jle 0x40d7c0
test esi, esi
jne 0x40d7ca
mov esi, 1
test ebp, ebp
je 0x40d71e
mov eax, dword [ebp]
test eax, eax
js 0x40d7d6
lea eax, [eax + eax*4]
lea eax, [ecx + eax*2 - 0x30]
mov dword [ebp], eax
jmp 0x40d71e
mov eax, ecx
lea edx, [esp + 0x70]
call fcn.0040c020
movzx eax, byte [ebx]
movsx ecx, al
inc ebx
test ecx, ecx
jne 0x40d6f0
mov eax, dword [esp + 0x88]
add esp, 0xac
pop ebx
pop esi
pop edi
pop ebp
ret
mov edi, 3
nop
lea esi, [esi]
mov esi, 4
jmp 0x40d71e
cmp esi, 2
jne 0x40d770
mov esi, 3
jmp 0x40d770
lea eax, [ecx - 0x30]
mov dword [ebp], eax
jmp 0x40d71e
mov edi, 2
mov esi, 4
jmp 0x40d71e
mov edi, 2
mov eax, 0xffffffff
mov dword [esp + 0x7c], eax
lea eax, [edi - 2]
cmp eax, 1
jbe 0x40de3a
mov eax, dword [esp + 0xd0]
mov edx, 1
add dword [esp + 0xd0], 4
mov eax, dword [eax]
mov byte [esp + 0x28], al
lea eax, [esp + 0x70]
mov dword [esp], eax
lea eax, [esp + 0x28]
call fcn.0040c070
jmp 0x40d6e0
mov edi, 2
lea eax, [edi - 2]
cmp eax, 1
ja 0x40de04
mov eax, dword [esp + 0xd0]
lea edi, [esp + 0x70]
add dword [esp + 0xd0], 4
mov esi, dword [eax]
test esi, esi
je 0x40e02c
mov dword [esp], esi
call sub.msvcrt.dll_wcslen
mov dword [esp], edi
mov edx, eax
mov eax, esi
call fcn.0040c110
jmp 0x40d6e0
movzx eax, byte [ebx]
mov edi, 2
cmp al, 0x6c
jne 0x40d895
inc ebx
mov edi, 3
movzx eax, byte [ebx]
or dword [esp + 0x74], 4
mov esi, 4
jmp 0x40d721
movzx eax, byte [ebx]
cmp al, 0x36
je 0x40df78
cmp al, 0x33
je 0x40dea9
mov edi, 2
mov esi, 4
jmp 0x40d721
or dword [esp + 0x74], 0x80
cmp edi, 3
je 0x40df91
cmp edi, 2
je 0x40e00d
mov eax, dword [esp + 0xd0]
add dword [esp + 0xd0], 4
mov eax, dword [eax]
mov ecx, eax
mov dword [esp + 0x28], eax
sar ecx, 0x1f
cmp edi, 1
mov dword [esp + 0x2c], ecx
je 0x40e040
cmp edi, 4
je 0x40defe
mov eax, dword [esp + 0x28]
lea ecx, [esp + 0x70]
mov edx, dword [esp + 0x2c]
mov dword [esp], ecx
call fcn.0040c220
jmp 0x40d6e0
movzx eax, byte [ebx]
mov edi, 1
cmp al, 0x68
jne 0x40d89a
inc ebx
mov edi, 4
movzx eax, byte [ebx]
mov esi, 4
jmp 0x40d721
cmp edi, 3
je 0x40dfb2
cmp edi, 2
je 0x40dff3
mov eax, dword [esp + 0xd0]
add dword [esp + 0xd0], 4
mov ebp, dword [eax]
xor eax, eax
mov dword [esp + 0x2c], eax
cmp edi, 1
mov dword [esp + 0x28], ebp
je 0x40e057
cmp edi, 4
je 0x40dec3
cmp ecx, 0x75
je 0x40d910
lea eax, [esp + 0x70]
mov edx, dword [esp + 0x2c]
mov dword [esp + 8], eax
mov eax, dword [esp + 0x28]
mov dword [esp + 4], edx
mov dword [esp], eax
mov eax, ecx
call fcn.0040c4a0
jmp 0x40d6e0
mov edx, dword [esp + 0x74]
or edx, 0x20
test dl, 4
mov dword [esp + 0x74], edx
je 0x40dd02
mov eax, dword [esp + 0xd0]
lea esi, [esp + 0x70]
add dword [esp + 0xd0], 0xc
fld xword [eax]
fxam
wait
fnstsw ax
and eax, 0x4500
cmp eax, 0x100
fld st(0)
fstp xword [esp + 0x30]
je 0x40df3c
mov ecx, dword [esp + 0x38]
mov edi, ecx
and edi, 0x8000
je 0x40da0f
or edx, 0x80
mov dword [esp + 0x74], edx
fxam
wait
fnstsw ax
fstp st(0)
and eax, 0x4500
cmp eax, 0x500
je 0x40e061
and ecx, 0x7fff
jne 0x40de70
mov edx, dword [esp + 0x34]
mov eax, dword [esp + 0x30]
mov edi, edx
or edi, eax
jne 0x40de70
mov word [esp + 0x38], 0
mov dword [esp + 0x10], esi
mov eax, dword [esp + 0x30]
mov dword [esp], eax
mov eax, dword [esp + 0x34]
mov dword [esp + 4], eax
mov eax, dword [esp + 0x38]
mov dword [esp + 8], eax
mov eax, dword [esp + 0x3c]
mov dword [esp + 0xc], eax
call fcn.0040d0e0
jmp 0x40d6e0
or dword [esp + 0x74], 0x800
xor ecx, ecx
mov eax, dword [esp + 0xd0]
add dword [esp + 0xd0], 4
mov edx, dword [eax]
lea eax, [esp + 0x70]
mov dword [esp + 8], eax
mov eax, 0x78
mov dword [esp + 0x28], edx
mov dword [esp + 0x2c], ecx
mov dword [esp], edx
mov dword [esp + 4], ecx
call fcn.0040c4a0
jmp 0x40d6e0
cmp edi, 4
je 0x40df59
cmp edi, 1
je 0x40dfd3
cmp edi, 2
je 0x40dad9
cmp edi, 3
je 0x40ded7
mov eax, dword [esp + 0xd0]
add dword [esp + 0xd0], 4
mov edx, dword [eax]
mov eax, dword [esp + 0x88]
mov dword [edx], eax
jmp 0x40d6e0
mov edx, dword [esp + 0x74]
or edx, 0x20
test dl, 4
mov dword [esp + 0x74], edx
jne 0x40dc3f
lea eax, [esp + 0x70]
mov dword [esp + 0xc], eax
mov eax, dword [esp + 0xd0]
add dword [esp + 0xd0], 8
fld qword [eax]
fstp xword [esp]
call fcn.0040cf40
jmp 0x40d6e0
mov edx, dword [esp + 0x74]
or edx, 0x20
test dl, 4
mov dword [esp + 0x74], edx
jne 0x40dc80
lea eax, [esp + 0x70]
mov dword [esp + 0xc], eax
mov eax, dword [esp + 0xd0]
add dword [esp + 0xd0], 8
fld qword [eax]
fstp xword [esp]
call fcn.0040cd70
jmp 0x40d6e0
mov edx, dword [esp + 0x74]
or edx, 0x20
test dl, 4
mov dword [esp + 0x74], edx
jne 0x40dcc1
lea eax, [esp + 0x70]
mov dword [esp + 0xc], eax
mov eax, dword [esp + 0xd0]
add dword [esp + 0xd0], 8
fld qword [eax]
fstp xword [esp]
call fcn.0040ce60
jmp 0x40d6e0
test esi, esi
jne 0x40d71e
or dword [esp + 0x74], 0x40
jmp 0x40d71e
test esi, esi
jne 0x40d71e
or dword [esp + 0x74], 0x100
jmp 0x40d71e
test ebp, ebp
je 0x40df30
test esi, esi
sete al
cmp esi, 2
sete dl
or eax, edx
test al, 1
je 0x40df30
mov eax, dword [esp + 0xd0]
add dword [esp + 0xd0], 4
mov eax, dword [eax]
test eax, eax
mov dword [ebp], eax
js 0x40df15
xor ebp, ebp
jmp 0x40d71e
lea edx, [esp + 0x70]
mov eax, ecx
call fcn.0040c020
jmp 0x40d6e0
test esi, esi
jne 0x40d71e
or dword [esp + 0x74], 0x800
jmp 0x40d71e
mov edx, dword [esp + 0x74]
test dl, 4
je 0x40db0c
lea eax, [esp + 0x70]
mov dword [esp + 0xc], eax
mov eax, dword [esp + 0xd0]
add dword [esp + 0xd0], 0xc
mov ecx, dword [eax + 8]
mov edx, dword [eax + 4]
mov eax, dword [eax]
mov dword [esp + 8], ecx
mov dword [esp + 4], edx
mov dword [esp], eax
call fcn.0040cf40
jmp 0x40d6e0
mov edx, dword [esp + 0x74]
test dl, 4
je 0x40db46
lea eax, [esp + 0x70]
mov dword [esp + 0xc], eax
mov eax, dword [esp + 0xd0]
add dword [esp + 0xd0], 0xc
mov ecx, dword [eax + 8]
mov edx, dword [eax + 4]
mov eax, dword [eax]
mov dword [esp + 8], ecx
mov dword [esp + 4], edx
mov dword [esp], eax
call fcn.0040cd70
jmp 0x40d6e0
mov edx, dword [esp + 0x74]
test dl, 4
je 0x40db80
lea eax, [esp + 0x70]
mov dword [esp + 0xc], eax
mov eax, dword [esp + 0xd0]
add dword [esp + 0xd0], 0xc
mov ecx, dword [eax + 8]
mov edx, dword [eax + 4]
mov eax, dword [eax]
mov dword [esp + 8], ecx
mov dword [esp + 4], edx
mov dword [esp], eax
call fcn.0040ce60
jmp 0x40d6e0
mov edx, dword [esp + 0x74]
test dl, 4
jne 0x40d9c7
mov eax, dword [esp + 0xd0]
lea edi, [esp + 0x70]
add dword [esp + 0xd0], 8
fld qword [eax]
fxam
wait
fnstsw ax
and eax, 0x4500
cmp eax, 0x100
fst qword [esp + 0x30]
je 0x40df52
movzx eax, word [esp + 0x36]
mov esi, eax
and esi, 0x8000
je 0x40dd49
or edx, 0x80
mov dword [esp + 0x74], edx
fstp qword [esp]
call fcn.0040e0a0
cmp eax, 0x500
je 0x40e075
movzx eax, word [esp + 0x36]
mov edx, dword [esp + 0x30]
mov ecx, dword [esp + 0x34]
shr eax, 4
shld ecx, edx, 8
shl edx, 8
mov dword [esp + 0x34], ecx
mov ecx, eax
mov dword [esp + 0x30], edx
movzx edx, word [esp + 0x36]
mov esi, edx
and esi, 0xfff
mov word [esp + 0x36], si
and ecx, 0x7ff
jne 0x40de80
mov edx, dword [esp + 0x34]
mov eax, dword [esp + 0x30]
mov ebp, edx
or ebp, eax
jne 0x40de80
mov word [esp + 0x38], 0
mov dword [esp + 0x10], edi
jmp 0x40da4f
test esi, esi
jne case.0x40d731.33
or dword [esp + 0x74], 0x200
jmp 0x40d71e
cmp esi, 1
ja 0x40d7c0
xor eax, eax
lea ebp, [esp + 0x7c]
mov esi, 2
mov dword [esp + 0x7c], eax
jmp 0x40d71e
test esi, esi
jne 0x40d71e
or dword [esp + 0x74], 0x400
jmp 0x40d71e
mov eax, dword [esp + 0xd0]
lea edi, [esp + 0x70]
add dword [esp + 0xd0], 4
mov esi, dword [eax]
test esi, esi
je 0x40e036
mov dword [esp], esi
call sub.msvcrt.dll_strlen
mov dword [esp], edi
mov edx, eax
mov eax, esi
call fcn.0040c070
jmp 0x40d6e0
mov eax, dword [esp + 0xd0]
xor esi, esi
add dword [esp + 0xd0], 4
movzx edx, word [eax]
lea eax, [esp + 0x70]
mov dword [esp], eax
lea eax, [esp + 0x28]
mov dword [esp + 0x28], edx
mov edx, 1
mov dword [esp + 0x2c], esi
call fcn.0040c110
jmp 0x40d6e0
lea eax, [ecx - 0x3fff]
mov word [esp + 0x38], ax
jmp 0x40da4b
lea eax, [ecx - 0x3ff]
cmp ax, 0xff83
mov word [esp + 0x38], ax
jl 0x40ddb4
mov dword [esp + 0x10], edi
lea eax, [esi + 0x1000]
mov word [esp + 0x36], ax
jmp 0x40da4f
cmp byte [ebx + 1], 0x32
jne 0x40d8b7
mov edi, 2
add ebx, 2
movzx eax, byte [ebx]
jmp 0x40d942
movzx eax, byte [esp + 0x28]
mov dword [esp + 0x28], eax
xor eax, eax
mov dword [esp + 0x2c], eax
jmp 0x40d98b
mov eax, dword [esp + 0xd0]
add dword [esp + 0xd0], 4
mov edx, dword [eax]
mov eax, dword [esp + 0x88]
mov dword [edx], eax
mov ecx, eax
sar ecx, 0x1f
mov dword [edx + 4], ecx
jmp 0x40d6e0
movsx eax, byte [esp + 0x28]
mov ebp, eax
sar ebp, 0x1f
mov dword [esp + 0x28], eax
mov dword [esp + 0x2c], ebp
jmp 0x40d910
test esi, esi
jne 0x40e089
or dword [esp + 0x74], 0x400
xor ebp, ebp
neg dword [esp + 0x78]
jmp 0x40d71e
mov esi, 4
xor ebp, ebp
jmp 0x40d71e
fstp st(0)
mov dword [esp], esi
mov edx, 0x418deb
xor eax, eax
call fcn.0040c7f0
jmp 0x40d6e0
fstp st(0)
mov dword [esp], edi
jmp 0x40df41
mov eax, dword [esp + 0xd0]
add dword [esp + 0xd0], 4
mov edx, dword [eax]
mov eax, dword [esp + 0x88]
mov byte [edx], al
jmp 0x40d6e0
cmp byte [ebx + 1], 0x34
mov edi, 3
je 0x40deb8
mov edi, 2
jmp 0x40d8bc
mov eax, dword [esp + 0xd0]
add dword [esp + 0xd0], 8
mov edx, dword [eax + 4]
mov eax, dword [eax]
mov dword [esp + 0x2c], edx
mov dword [esp + 0x28], eax
jmp 0x40d910
mov eax, dword [esp + 0xd0]
add dword [esp + 0xd0], 8
mov edx, dword [eax + 4]
mov eax, dword [eax]
mov dword [esp + 0x2c], edx
mov dword [esp + 0x28], eax
jmp 0x40d98b
mov eax, dword [esp + 0xd0]
add dword [esp + 0xd0], 4
mov edx, dword [eax]
mov eax, dword [esp + 0x88]
mov word [edx], ax
jmp 0x40d6e0
mov eax, dword [esp + 0xd0]
add dword [esp + 0xd0], 4
mov edx, dword [eax]
mov dword [esp + 0x28], edx
jmp 0x40decc
mov eax, dword [esp + 0xd0]
add dword [esp + 0xd0], 4
mov eax, dword [eax]
cdq
mov dword [esp + 0x28], eax
mov dword [esp + 0x2c], edx
jmp 0x40d910
mov esi, 0x418df0
jmp 0x40d867
mov esi, str._null_
jmp 0x40de21
movsx eax, word [esp + 0x28]
mov edi, eax
sar edi, 0x1f
mov dword [esp + 0x28], eax
mov dword [esp + 0x2c], edi
jmp 0x40d910
movzx eax, word [esp + 0x28]
jmp 0x40dec8
mov dword [esp], esi
mov edx, 0x418e05
mov eax, edi
call fcn.0040c7f0
jmp 0x40d6e0
mov dword [esp], edi
mov edx, 0x418e05
mov eax, esi
call fcn.0040c7f0
jmp 0x40d6e0
mov eax, 0xffffffff
xor ebp, ebp
mov dword [esp + 0x7c], eax
jmp 0x40d71e