Function at 0x40a800
Capabilities:
Query environment variable

Disassembly:
push ebp
push edi
push esi
xor esi, esi
push ebx
sub esp, 0x6c
mov edi, dword [esp + 0x8c]
mov ebp, dword [esp + 0x90]
call sub.msvcrt.dll__errno
and dword [esp + 0x80], 0x6000
mov eax, dword [eax]
mov dword [esp], 0x41bc5d
mov dword [esp + 0x3c], 0xffffffff
mov dword [esp + 0x40], 0xffffffff
mov dword [esp + 0x1c], eax
mov eax, dword [esp + 0x84]
mov dword [esp + 0x44], 0xfffffffd
mov word [esp + 0x48], si
mov dword [esp + 0x4c], 0
mov dword [esp + 0x34], eax
mov eax, dword [esp + 0x80]
mov dword [esp + 0x54], 0
mov dword [esp + 0x38], eax
xor eax, eax
mov word [esp + 0x50], ax
mov eax, dword [esp + 0x88]
mov dword [esp + 0x58], eax
call sub.msvcrt.dll_getenv
test eax, eax
je 0x40a8a2
movsx edx, byte [eax]
mov eax, 2
sub edx, 0x30
cmp edx, 2
jbe 0x40a8af
call 0x414084
and eax, 1
neg eax
add eax, 3
mov dword [esp + 0x5c], eax
movzx eax, word [edi]
lea ebx, [edi + 2]
mov esi, ebx
test eax, eax
je 0x40a957
cmp eax, 0x25
jne 0x40a963
mov eax, dword [esp + 0x80]
movzx edx, word [edi + 2]
mov dword [esp + 0x40], 0xffffffff
mov dword [esp + 0x3c], 0xffffffff
mov dword [esp + 0x38], eax
lea eax, [esp + 0x3c]
test dx, dx
mov dword [esp + 0x18], eax
mov dword [esp + 0x14], 0
mov dword [esp + 0x10], 0
je 0x40a945
lea ecx, [edx - 0x20]
movzx eax, dx
cmp cx, 0x5a
lea edi, [esi + 2]
ja case.0x40a91e.1
movzx ecx, cx
jmp dword [ecx*4 + 0x41bc74]
movzx edx, word [esi + 2]
mov esi, edi
mov dword [esp + 0x14], 2
mov dword [esp + 0x10], 4
nop
lea esi, [esi]
test dx, dx
jne 0x40a908
mov edi, esi
movzx eax, word [edi]
lea ebx, [edi + 2]
mov esi, ebx
test eax, eax
jne 0x40a8c3
mov eax, dword [esp + 0x54]
add esp, 0x6c
pop ebx
pop esi
pop edi
pop ebp
ret
lea edx, [esp + 0x34]
mov edi, ebx
call fcn.00409300
jmp 0x40a8b3
mov edx, dword [esp + 0x14]
mov eax, ebp
sub edx, 2
cmp edx, 1
jbe case.0x40a91e.51
mov ebx, dword [eax]
add ebp, 4
test ebx, ebx
je 0x40aca6
mov dword [esp], ebx
call sub.msvcrt.dll_strlen
mov edx, eax
lea ecx, [esp + 0x34]
mov eax, ebx
call fcn.00409440
jmp 0x40a8b3
mov edx, dword [esp + 0x14]
mov eax, ebp
mov dword [esp + 0x40], 0xffffffff
sub edx, 2
cmp edx, 1
jbe 0x40ae78
mov eax, dword [eax]
lea ecx, [esp + 0x34]
mov edx, 1
add ebp, 4
mov byte [esp + 0x28], al
lea eax, [esp + 0x28]
call fcn.00409440
jmp 0x40a8b3
mov eax, dword [esp + 0x38]
or eax, 0x20
test al, 4
mov dword [esp + 0x38], eax
je 0x40ad8c
fld xword [ebp]
lea ebx, [ebp + 0xc]
fstp xword [esp]
mov ebp, ebx
lea eax, [esp + 0x34]
call fcn.0040a2f0
jmp 0x40a8b3
mov eax, dword [esp + 0x38]
or eax, 0x20
test al, 4
mov dword [esp + 0x38], eax
je 0x40ae50
fld xword [ebp]
lea ebx, [ebp + 0xc]
fstp xword [esp]
mov ebp, ebx
lea eax, [esp + 0x34]
call fcn.00409fe0
jmp 0x40a8b3
or dword [esp + 0x38], 0x80
cmp dword [esp + 0x14], 3
je 0x40b006
cmp dword [esp + 0x14], 2
je 0x40b0cc
mov eax, dword [ebp]
lea edx, [ebp + 4]
mov dword [esp + 0x28], eax
sar eax, 0x1f
cmp dword [esp + 0x14], 1
mov dword [esp + 0x2c], eax
je 0x40b11e
cmp dword [esp + 0x14], 4
mov ebp, edx
je 0x40b176
mov eax, dword [esp + 0x28]
lea ecx, [esp + 0x34]
mov edx, dword [esp + 0x2c]
call fcn.004095c0
jmp 0x40a8b3
cmp dword [esp + 0x14], 3
je 0x40b03a
cmp dword [esp + 0x14], 2
je 0x40b0aa
mov esi, dword [ebp]
lea edx, [ebp + 4]
cmp dword [esp + 0x14], 1
mov dword [esp + 0x2c], 0
mov dword [esp + 0x28], esi
je 0x40b135
cmp dword [esp + 0x14], 4
mov ebp, edx
je 0x40b18b
cmp eax, 0x75
je 0x40aa97
mov edx, dword [esp + 0x28]
lea esi, [esp + 0x34]
mov ecx, dword [esp + 0x2c]
mov dword [esp], esi
call fcn.00409880
jmp 0x40a8b3
movzx edx, word [esi + 2]
mov esi, edi
or dword [esp + 0x38], 4
mov dword [esp + 0x10], 4
jmp 0x40a940
movzx edx, word [esi + 2]
cmp dx, 0x36
je 0x40b050
cmp dx, 0x33
jne 0x40acc3
cmp word [esi + 4], 0x32
je 0x40b0f6
mov edx, 0x33
mov esi, edi
mov dword [esp + 0x14], 2
mov dword [esp + 0x10], 4
jmp 0x40a940
mov ebx, dword [esp + 0x10]
test ebx, ebx
jne 0x40ab80
mov eax, dword [esp + 0x80]
cmp dword [esp + 0x38], eax
je 0x40b0e2
mov eax, dword [ebp]
lea ebx, [ebp + 4]
mov dword [esp + 0x2c], 0
mov ecx, dword [esp + 0x2c]
mov ebp, ebx
mov dword [esp + 0x28], eax
mov edx, dword [esp + 0x28]
lea eax, [esp + 0x34]
mov dword [esp], eax
mov eax, 0x78
call fcn.00409880
jmp 0x40a8b3
cmp dword [esp + 0x14], 4
je 0x40afd7
cmp dword [esp + 0x14], 1
mov eax, dword [ebp]
mov edx, dword [esp + 0x54]
je 0x40b0c1
cmp dword [esp + 0x14], 2
je 0x40b114
cmp dword [esp + 0x14], 3
mov dword [eax], edx
je 0x40b166
add ebp, 4
jmp 0x40a8b3
movzx edx, word [esi + 2]
mov esi, edi
mov dword [esp + 0x14], 3
mov dword [esp + 0x10], 4
jmp 0x40a940
movzx edx, word [esi + 2]
cmp dx, 0x68
je 0x40b01c
mov dword [esp + 0x14], 1
mov esi, edi
mov dword [esp + 0x10], 4
jmp 0x40a940
mov eax, dword [esp + 0x38]
or eax, 0x20
test al, 4
mov dword [esp + 0x38], eax
je 0x40acec
fld xword [ebp]
lea ebx, [ebp + 0xc]
fstp xword [esp]
mov ebp, ebx
lea eax, [esp + 0x34]
call fcn.0040a170
jmp 0x40a8b3
mov eax, dword [esp + 0x38]
or eax, 0x20
test al, 4
mov dword [esp + 0x38], eax
je 0x40aeac
fld xword [ebp]
lea ebx, [ebp + 0xc]
fstp xword [esp]
mov ebp, ebx
lea eax, [esp + 0x34]
call fcn.0040a090
jmp 0x40a8b3
mov eax, dword [esp + 0x1c]
mov dword [esp], eax
call sub.msvcrt.dll_strerror
test eax, eax
mov ebx, eax
jne 0x40a992
mov edx, 6
mov ebx, 0x41bc56
jmp 0x40a99c
movzx edx, word [esi + 2]
cmp dx, 0x6c
je 0x40afe8
mov dword [esp + 0x14], 2
mov esi, edi
mov dword [esp + 0x10], 4
jmp 0x40a940
mov eax, dword [esp + 0x38]
test al, 4
jne 0x40ac48
fld qword [ebp]
lea ebx, [ebp + 8]
fstp xword [esp]
mov ebp, ebx
lea eax, [esp + 0x34]
call fcn.0040a170
jmp 0x40a8b3
mov eax, dword [esp + 0x10]
test eax, eax
jne 0x40ad6f
movzx edx, word [esi + 2]
mov esi, edi
or dword [esp + 0x38], 0x100
jmp 0x40a940
mov ecx, dword [esp + 0x18]
test ecx, ecx
je 0x40ae12
test dword [esp + 0x10], 0xfffffffd
jne 0x40af67
mov edx, dword [ebp]
lea eax, [ebp + 4]
mov ecx, dword [esp + 0x18]
test edx, edx
mov dword [ecx], edx
js 0x40b14d
movzx edx, word [esi + 2]
mov ebp, eax
mov esi, edi
mov dword [esp + 0x18], 0
jmp 0x40a940
mov eax, dword [esp + 0x10]
test eax, eax
je 0x40af82
movzx edx, word [esi + 2]
mov esi, edi
jmp 0x40a940
mov eax, dword [esp + 0x38]
test al, 4
jne 0x40aa03
fld qword [ebp]
lea ebx, [ebp + 8]
fstp xword [esp]
mov ebp, ebx
lea eax, [esp + 0x34]
call fcn.0040a2f0
jmp 0x40a8b3
mov ecx, dword [esp + 0x10]
test ecx, ecx
je 0x40af54
mov ecx, dword [esp + 0x10]
cmp ecx, 4
je 0x40b1dc
sub edx, 0x30
cmp dx, 9
ja 0x40b1dc
test ecx, ecx
jne 0x40af40
mov dword [esp + 0x10], 1
mov edx, dword [esp + 0x18]
test edx, edx
je 0x40ad6f
mov ecx, dword [esp + 0x18]
mov edx, dword [ecx]
test edx, edx
js 0x40b09a
mov ecx, dword [esp + 0x18]
lea edx, [edx + edx*4]
lea eax, [eax + edx*2 - 0x30]
movzx edx, word [esi + 2]
mov dword [ecx], eax
jmp 0x40ad73
cmp dword [esp + 0x10], 1
jbe 0x40b077
movzx edx, word [esi + 2]
mov esi, edi
mov dword [esp + 0x10], 4
jmp 0x40a940
mov eax, dword [esp + 0x10]
test eax, eax
jne 0x40ad6f
movzx edx, word [esi + 2]
mov esi, edi
or dword [esp + 0x38], 0x400
jmp 0x40a940
mov eax, dword [esp + 0x38]
test al, 4
jne 0x40aa33
fld qword [ebp]
lea ebx, [ebp + 8]
fstp xword [esp]
mov ebp, ebx
lea eax, [esp + 0x34]
call fcn.00409fe0
jmp 0x40a8b3
mov dword [esp + 0x40], 0xffffffff
mov eax, dword [ebp]
lea ebx, [ebp + 4]
mov edx, 1
lea ecx, [esp + 0x34]
mov ebp, ebx
mov word [esp + 0x28], ax
lea eax, [esp + 0x28]
call fcn.00409360
jmp 0x40a8b3
mov eax, dword [esp + 0x38]
test al, 4
jne 0x40ac74
fld qword [ebp]
lea ebx, [ebp + 8]
fstp xword [esp]
mov ebp, ebx
lea eax, [esp + 0x34]
call fcn.0040a090
jmp 0x40a8b3
mov eax, dword [esp + 0x10]
test eax, eax
jne 0x40ad6f
movzx edx, word [esi + 2]
mov esi, edi
or dword [esp + 0x38], 0x800
jmp 0x40a940
mov eax, dword [esp + 0x10]
test eax, eax
jne 0x40ad6f
movzx edx, word [esi + 2]
mov esi, edi
or dword [esp + 0x38], 0x40
jmp 0x40a940
lea edx, [esp + 0x34]
call fcn.00409300
jmp 0x40a8b3
mov ebx, dword [ebp]
mov eax, 0x41bc48
lea esi, [ebp + 4]
mov ebp, esi
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.00409360
jmp 0x40a8b3
cmp ecx, 2
mov edx, 3
cmovne edx, ecx
mov dword [esp + 0x10], edx
jmp 0x40addb
movzx edx, word [esi + 2]
mov esi, edi
or dword [esp + 0x38], 0x200
jmp 0x40a940
movzx edx, word [esi + 2]
mov esi, edi
mov dword [esp + 0x18], 0
mov dword [esp + 0x10], 4
jmp 0x40a940
or dword [esp + 0x38], 0x1000
mov dword [esp + 0x28], 0
call sub.msvcrt.dll_localeconv
lea ecx, [esp + 0x28]
mov dword [esp + 0xc], ecx
mov dword [esp + 8], 0x10
mov eax, dword [eax + 4]
mov dword [esp + 4], eax
lea eax, [esp + 0x26]
mov dword [esp], eax
call fcn.0040eba0
test eax, eax
jle 0x40afc8
movzx edx, word [esp + 0x26]
mov word [esp + 0x50], dx
movzx edx, word [esi + 2]
mov esi, edi
mov dword [esp + 0x4c], eax
jmp 0x40a940
mov edx, dword [ebp]
add ebp, 4
mov eax, dword [esp + 0x54]
mov byte [edx], al
jmp 0x40a8b3
lea edi, [esi + 4]
movzx edx, word [esi + 4]
mov dword [esp + 0x14], 3
mov esi, edi
mov dword [esp + 0x10], 4
jmp 0x40a940
mov eax, dword [ebp]
add ebp, 8
mov edx, dword [ebp - 4]
mov dword [esp + 0x28], eax
mov dword [esp + 0x2c], edx
jmp 0x40aa97
lea edi, [esi + 4]
movzx edx, word [esi + 4]
mov dword [esp + 0x14], 4
mov esi, edi
mov dword [esp + 0x10], 4
jmp 0x40a940
mov ecx, dword [ebp]
add ebp, 8
mov ebx, dword [ebp - 4]
mov dword [esp + 0x28], ecx
mov dword [esp + 0x2c], ebx
jmp 0x40aaf0
cmp word [esi + 4], 0x34
je 0x40b1a1
mov edx, 0x36
mov esi, edi
mov dword [esp + 0x14], 2
mov dword [esp + 0x10], 4
jmp 0x40a940
lea eax, [esp + 0x40]
movzx edx, word [esi + 2]
mov esi, edi
mov dword [esp + 0x40], 0
mov dword [esp + 0x18], eax
mov dword [esp + 0x10], 2
jmp 0x40a940
sub eax, 0x30
movzx edx, word [esi + 2]
mov esi, edi
mov dword [ecx], eax
jmp 0x40a940
mov esi, dword [ebp]
add ebp, 4
mov dword [esp + 0x2c], 0
mov dword [esp + 0x28], esi
jmp 0x40aaf0
mov word [eax], dx
add ebp, 4
jmp 0x40a8b3
mov eax, dword [ebp]
add ebp, 4
mov dword [esp + 0x28], eax
sar eax, 0x1f
mov dword [esp + 0x2c], eax
jmp 0x40aa97
or ah, 2
mov dword [esp + 0x38], eax
mov dword [esp + 0x40], 8
jmp 0x40ab80
lea edi, [esi + 6]
movzx edx, word [esi + 6]
mov dword [esp + 0x14], 2
mov esi, edi
mov dword [esp + 0x10], 4
jmp 0x40a940
mov dword [eax], edx
add ebp, 4
jmp 0x40a8b3
movsx eax, word [esp + 0x28]
mov ebp, edx
mov dword [esp + 0x28], eax
sar eax, 0x1f
mov dword [esp + 0x2c], eax
jmp 0x40aa97
movzx ecx, word [esp + 0x28]
mov ebp, edx
mov dword [esp + 0x2c], 0
mov dword [esp + 0x28], ecx
jmp 0x40aaf0
mov edx, dword [esp + 0x10]
test edx, edx
jne 0x40b1bf
or dword [esp + 0x38], 0x400
neg dword [esp + 0x3c]
jmp 0x40ad4e
mov esi, edx
add ebp, 4
sar esi, 0x1f
mov dword [eax + 4], esi
jmp 0x40a8b3
movsx eax, byte [esp + 0x28]
mov dword [esp + 0x28], eax
sar eax, 0x1f
mov dword [esp + 0x2c], eax
jmp 0x40aa97
movzx edx, byte [esp + 0x28]
mov dword [esp + 0x2c], 0
mov dword [esp + 0x28], edx
jmp 0x40aaf0
lea edi, [esi + 6]
movzx edx, word [esi + 6]
mov dword [esp + 0x14], 3
mov esi, edi
mov dword [esp + 0x10], 4
jmp 0x40a940
movzx edx, word [esi + 2]
mov ebp, eax
mov esi, edi
mov dword [esp + 0x40], 0xffffffff
mov dword [esp + 0x18], 0
jmp 0x40a940
lea edx, [esp + 0x34]
mov eax, 0x25
mov edi, ebx
call fcn.00409300
jmp 0x40a8b3