Function at 0x402200
Capabilities:
Query environment variable

Disassembly:
sub esp, 0xf0
push ebx
push ebp
mov ebp, dword [esp + 0xfc]
push esi
mov esi, ecx
xor ebx, ebx
push edi
push ebx
mov byte [esi + 5], 0
mov byte [esi + 4], 0
mov dword [esi + 0x10], ebx
mov dword [esi + 0xc], ebp
mov dword [esi + 0x18], ebx
mov dword [esi + 0x1c], ebx
call dword [sym.imp.MSVCRT.dll_time]
mov edx, dword [esp + 0x10c]
mov ecx, dword [esi + 0xc]
add esp, 4
mov dword [esi + 8], eax
call fcn.00402690
mov edi, eax
mov eax, ebp
test ebp, ebp
mov ebp, dword [sym.imp.KERNEL32.dll_GetEnvironmentVariableA]
jne 0x402277
push 0x20
lea eax, [esp + 0x14]
push eax
push str.____70AA37E1_6D4D_11d4_A90B_0050DACE2436__x
call ebp
test eax, eax
jbe 0x402275
lea ecx, [esp + 0x10]
push ecx
call dword [sym.imp.MSVCRT.dll_atol]
add esp, 4
jmp 0x402277
xor eax, eax
dec eax
cmp eax, 0x10
ja case.0x40227d.6
jmp dword [eax*4 + 0x40248c]
mov ebx, 3
jmp case.0x40227d.6
mov ebx, 8
jmp case.0x40227d.6
mov ebx, 0x16
jmp case.0x40227d.6
mov ebx, 2
jmp case.0x40227d.6
mov ebx, 4
jmp case.0x40227d.6
mov ebx, 5
jmp case.0x40227d.6
mov ebx, 0xe
jmp case.0x40227d.6
mov ebx, 1
jmp case.0x40227d.6
mov ebx, 0xf
jmp case.0x40227d.6
mov ebx, 9
jmp case.0x40227d.6
mov ebx, 0x10
jmp case.0x40227d.6
mov ebx, 7
jmp case.0x40227d.6
mov ebx, 0x14
jmp case.0x40227d.6
mov ebx, 0x15
test edi, edi
je 0x40247f
mov al, byte [edi + 4]
mov edx, dword [edi]
test al, al
push 1
lea eax, [esp + 0x34]
mov ecx, edi
push eax
call dword [edx + 4]
test eax, eax
je 0x402337
mov cl, byte [edi + 4]
test cl, cl
je 0x402333
mov ecx, dword [esi + 0xc]
test ecx, ecx
jne 0x402333
mov edx, dword [edi]
push 1
mov ecx, edi
call dword [edx]
mov ecx, dword [esi + 0xc]
xor edx, edx
call fcn.00402690
mov edi, eax
mov eax, dword [edi]
push 1
lea ecx, [esp + 0x34]
push ecx
mov ecx, edi
call dword [eax + 4]
test eax, eax
jne 0x402355
movzx edx, word [esp + 0x30]
cmp edx, ebx
je 0x402347
mov eax, dword [esi + 0xc]
test eax, eax
jne 0x402355
mov eax, dword [esp + 0x38]
mov ecx, dword [esp + 0x3c]
mov dword [esi + 0x18], eax
mov dword [esi + 0x1c], ecx
cmp dword [esi + 0xc], 0xe
jne 0x402388
mov edx, dword [esi]
mov ecx, esi
call dword [edx + 0x14]
test al, al
je 0x402388
mov ecx, dword [esi + 0x18]
mov eax, dword [esi + 0x1c]
or ecx, 0x3000000
mov dword [esi + 0x1c], eax
mov eax, ecx
mov dword [esi + 0x18], ecx
mov ecx, dword [esi + 0x1c]
and eax, 0xfffdffff
mov dword [esi + 0x18], eax
mov dword [esi + 0x1c], ecx
mov edx, dword [edi]
push 1
mov ecx, edi
call dword [edx]
mov eax, dword [esi + 0x10]
test eax, eax
jne 0x402463
push 0x20
lea eax, [esp + 0x14]
push eax
push str.____70AA37E1_6D4D_11d4_A90B_0050DACE2436__x
call ebp
test eax, eax
jbe 0x4023bf
lea ecx, [esp + 0x10]
push ecx
call dword [sym.imp.MSVCRT.dll_atol]
add esp, 4
mov edi, eax
jmp 0x4023c1
xor edi, edi
call dword [sym.imp.KERNEL32.dll_GetCurrentProcessId]
push edi
xor ecx, ecx
mov cx, ax
mov edi, eax
shl edi, 4
movzx edi, di
mov edx, eax
mov ebx, ecx
xor ebx, 0x5c9d
or edi, ebx
push edi
mov edi, eax
xor edi, 0x1a22b3c4
mov ebx, eax
shl edx, 6
movzx edx, dx
shl ebx, 0xe
or edi, ebx
push edi
mov edi, ecx
xor edi, 0xa9f1
or edi, edx
push edi
mov edi, ecx
xor edi, 0xfedc
or edi, edx
xor edx, edx
mov dh, al
xor ecx, 0x1234
push edi
movzx edx, dx
or edx, ecx
mov ecx, eax
push edx
xor ecx, 0xbadd
shl eax, 0x10
or ecx, eax
push ecx
push 0x412a04
lea edx, [esp + 0xa0]
push str._s_08lX__04lX__04lX__04lX__08lX_04lX__X
push edx
call dword [sym.imp.MSVCRT.dll_sprintf]
add esp, 0x28
lea eax, [esp + 0x80]
push eax
push 0
push 0x1f0001
call dword [sym.imp.KERNEL32.dll_OpenMutexA]
test eax, eax
mov dword [esi + 0x10], eax
je 0x402475
mov eax, dword [esi + 0x18]
and eax, 0x4000000
xor ecx, ecx
or eax, ecx
jne 0x402475
mov byte [esi + 5], 1
mov edx, dword [esi]
mov ecx, esi
call dword [edx + 4]
mov byte [esi + 4], al
pop edi
pop esi
pop ebp
pop ebx
add esp, 0xf0
ret 8