Function at 0x40f3f0
Capabilities:
Query environment variable

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x38
mov eax, dword [ebp + 8]
mov dword [eax + 4], 0
mov dword [ebp - 0x10], 0x3b9aca00
cmp dword [ebp - 0x10], 0x3b9aca00
je 0x40f42b
mov eax, dword [ebp + 8]
mov eax, dword [eax]
mov dword [eax + 0x14], 2
mov eax, dword [ebp + 8]
mov eax, dword [eax]
mov edx, dword [eax]
mov eax, dword [ebp + 8]
mov dword [esp], eax
call edx
mov eax, dword [ebp + 8]
mov dword [esp], eax
call sym._jpeg_mem_init
mov dword [ebp - 0x1c], eax
mov dword [esp + 4], 0x54
mov eax, dword [ebp + 8]
mov dword [esp], eax
call sym._jpeg_get_small
mov dword [ebp - 0x18], eax
cmp dword [ebp - 0x18], 0
jne 0x40f487
mov eax, dword [ebp + 8]
mov dword [esp], eax
call sym._jpeg_mem_term
mov eax, dword [ebp + 8]
mov eax, dword [eax]
mov dword [eax + 0x14], 0x38
mov eax, dword [ebp + 8]
mov eax, dword [eax]
mov dword [eax + 0x18], 0
mov eax, dword [ebp + 8]
mov eax, dword [eax]
mov edx, dword [eax]
mov eax, dword [ebp + 8]
mov dword [esp], eax
call edx
mov eax, dword [ebp - 0x18]
mov dword [eax], sym._alloc_small
mov eax, dword [ebp - 0x18]
mov dword [eax + 4], sym._alloc_large
mov eax, dword [ebp - 0x18]
mov dword [eax + 8], sym._alloc_sarray
mov eax, dword [ebp - 0x18]
mov dword [eax + 0xc], sym._alloc_barray
mov eax, dword [ebp - 0x18]
mov dword [eax + 0x10], sym._request_virt_sarray
mov eax, dword [ebp - 0x18]
mov dword [eax + 0x14], sym._request_virt_barray
mov eax, dword [ebp - 0x18]
mov dword [eax + 0x18], sym._realize_virt_arrays
mov eax, dword [ebp - 0x18]
mov dword [eax + 0x1c], sym._access_virt_sarray
mov eax, dword [ebp - 0x18]
mov dword [eax + 0x20], sym._access_virt_barray
mov eax, dword [ebp - 0x18]
mov dword [eax + 0x24], sym._free_pool
mov eax, dword [ebp - 0x18]
mov dword [eax + 0x28], sym._self_destruct
mov eax, dword [ebp - 0x18]
mov dword [eax + 0x30], 0x3b9aca00
mov edx, dword [ebp - 0x1c]
mov eax, dword [ebp - 0x18]
mov dword [eax + 0x2c], edx
mov dword [ebp - 0x14], 1
jmp 0x40f535
mov edx, dword [ebp - 0x14]
mov eax, dword [ebp - 0x18]
add edx, 0xc
mov dword [eax + edx*4 + 4], 0
mov edx, dword [ebp - 0x14]
mov eax, dword [ebp - 0x18]
add edx, 0xc
mov dword [eax + edx*4 + 0xc], 0
dec dword [ebp - 0x14]
cmp dword [ebp - 0x14], 0
jns 0x40f510
mov eax, dword [ebp - 0x18]
mov dword [eax + 0x44], 0
mov eax, dword [ebp - 0x18]
mov dword [eax + 0x48], 0
mov eax, dword [ebp - 0x18]
mov dword [eax + 0x4c], 0x54
mov edx, dword [ebp - 0x18]
mov eax, dword [ebp + 8]
mov dword [eax + 4], edx
mov dword [esp], str.JPEGMEM
call sym._getenv
mov dword [ebp - 0xc], eax
cmp dword [ebp - 0xc], 0
je 0x40f5fb
mov byte [ebp - 0x1d], 0x78
lea eax, [ebp - 0x1d]
mov dword [esp + 0xc], eax
lea eax, [ebp - 0x1c]
mov dword [esp + 8], eax
mov dword [esp + 4], str._ld_c
mov eax, dword [ebp - 0xc]
mov dword [esp], eax
call sym._sscanf
test eax, eax
jle 0x40f5fb
mov al, byte [ebp - 0x1d]
cmp al, 0x6d
je 0x40f5b2
mov al, byte [ebp - 0x1d]
cmp al, 0x4d
jne 0x40f5d4
mov edx, dword [ebp - 0x1c]
mov eax, edx
shl eax, 2
add eax, edx
lea edx, [eax*4]
add eax, edx
lea edx, [eax*4]
add eax, edx
shl eax, 3
mov dword [ebp - 0x1c], eax
mov edx, dword [ebp - 0x1c]
mov eax, edx
shl eax, 2
add eax, edx
lea edx, [eax*4]
add eax, edx
lea edx, [eax*4]
add eax, edx
shl eax, 3
mov edx, eax
mov eax, dword [ebp - 0x18]
mov dword [eax + 0x2c], edx
leave
ret