Function at 0x41d000
Capabilities:
Encode data using base64
Query environment variable

Disassembly:
push ebp
xor edx, edx
mov ebp, esp
push edi
push esi
push ebx
sub esp, 0x4c
mov eax, dword [0x425214]
mov edi, dword [ebp + 0x10]
test eax, eax
setle dl
or dword [0x43636c], edx
je 0x41d210
mov dword [0x425214], 1
mov dword [0x43636c], 0
xor ecx, ecx
mov dword [0x43637c], ecx
mov dword [0x436378], 0
lea eax, [ecx + 1]
mov dword [0x436384], eax
cmp dword [ebp + 0xc], eax
mov dword [0x436380], eax
jle 0x41d0c2
mov ebx, dword [edi + eax*4]
mov dword [0x43637c], eax
cmp byte [ebx], 0x2d
mov dword [0x436378], ebx
je 0x41d101
mov eax, dword [ebp + 0x14]
movzx eax, byte [eax]
cmp al, 0x2d
je 0x41d5d9
movsx edx, al
mov eax, dword [0x436374]
test eax, eax
jne 0x41d0e0
test dh, 0x10
jne 0x41d0e5
cmp edx, 0x2b
mov dword [0x436374], 0x1000
je 0x41d350
mov dword [esp], str.POSIXLY_CORRECT
call sub.msvcrt.dll_getenv
test eax, eax
mov eax, dword [0x436374]
je 0x41d0ec
or eax, 0x10
mov dword [0x436374], eax
mov eax, dword [0x436384]
mov esi, 0xffffffff
mov dword [0x425214], eax
lea esp, [ebp - 0xc]
mov eax, esi
pop ebx
pop esi
pop edi
pop ebp
ret
test dh, 0x10
je 0x41d0ec
or eax, edx
mov dword [0x436374], eax
and eax, 0x10
test eax, eax
jne 0x41d0c2
mov ecx, dword [0x436380]
lea eax, [ecx + 1]
jmp 0x41d052
movzx edx, byte [ebx + 1]
lea esi, [ebx + 1]
mov dword [0x436378], esi
test dl, dl
je 0x41d073
mov dword [ebp - 0x2c], ebx
mov ebx, esi
mov esi, edx
mov edx, ebx
mov ebx, esi
cmp bl, 0x2d
jne 0x41d603
mov ebx, dword [ebp - 0x2c]
cmp byte [ebx + 2], 0
je 0x41d81f
mov esi, dword [ebp + 8]
test esi, esi
jle 0x41d6c0
mov eax, dword [ebp + 0x18]
mov esi, dword [ebp + 0x1c]
add ebx, 2
mov dword [0x436378], ebx
mov dword [0x436370], 0
test eax, eax
mov dword [ebp - 0x34], eax
mov dword [ebp - 0x3c], esi
je 0x41d311
mov eax, dword [ebp - 0x34]
mov eax, dword [eax]
test eax, eax
je 0x41d311
mov dword [ebp + 8], 1
mov esi, dword [0x436378]
mov dword [ebp - 0x30], 0xffffffff
mov dword [ebp - 0x2c], 0
lea ebx, [esi + 1]
mov dword [ebp - 0x40], esi
movzx esi, byte [esi]
mov dword [ebp - 0x38], ebx
mov ebx, dword [ebp - 0x34]
mov ecx, esi
mov esi, ebx
mov ebx, ecx
test bl, bl
mov ecx, ebx
je 0x41d1d6
cmp bl, byte [eax]
mov edx, dword [ebp - 0x38]
je 0x41d1c8
jmp 0x41d2e0
cmp cl, byte [eax]
jne 0x41d2e0
add edx, 1
movzx ecx, byte [edx - 1]
add eax, 1
test cl, cl
jne 0x41d1c0
cmp byte [eax], 0
je 0x41d360
cmp dword [ebp - 0x30], 0xffffffff
jne 0x41d919
mov eax, dword [ebp - 0x2c]
add esi, 0x10
lea ecx, [eax + 1]
mov eax, dword [esi]
test eax, eax
je 0x41da3d
mov ebx, dword [ebp - 0x40]
mov edx, dword [ebp - 0x2c]
mov dword [ebp - 0x2c], ecx
movzx ebx, byte [ebx]
mov dword [ebp - 0x30], edx
jmp 0x41d1a6
mov esi, dword [0x436384]
lea ecx, [eax - 1]
cmp eax, esi
jl 0x41d03a
mov ecx, dword [0x436380]
lea ebx, [ecx + 1]
cmp eax, ebx
mov dword [ebp - 0x34], ebx
jg 0x41d3c0
mov eax, dword [0x436378]
test eax, eax
mov dword [ebp - 0x30], eax
je 0x41d512
movzx ebx, byte [eax]
test bl, bl
je 0x41d512
mov eax, dword [ebp - 0x30]
movsx esi, bl
mov dword [0x42520c], esi
add eax, 1
mov dword [ebp - 0x2c], eax
mov dword [0x436378], eax
mov eax, dword [ebp + 0x14]
movzx eax, byte [eax]
lea edx, [eax - 0x2b]
and edx, 0xfd
jne 0x41d520
mov eax, dword [ebp + 0x14]
lea edx, [eax + 1]
movzx eax, byte [eax + 1]
cmp al, 0x3a
jne 0x41d29e
jmp 0x41d52b
add edx, 1
movzx eax, byte [edx]
test al, al
je 0x41d540
cmp bl, al
jne 0x41d290
cmp byte [edx + 1], 0x3a
je 0x41d58b
mov eax, dword [ebp - 0x2c]
mov dword [0x436370], 0
test eax, eax
je 0x41d2c6
mov eax, dword [ebp - 0x30]
cmp byte [eax + 1], 0
jne 0x41d2c9
mov ecx, dword [ebp - 0x34]
mov dword [0x425214], ecx
lea esp, [ebp - 0xc]
mov eax, esi
pop ebx
pop esi
pop edi
pop ebp
ret
cmp cl, 0x3d
je 0x41d580
add esi, 0x10
mov eax, dword [esi]
add dword [ebp - 0x2c], 1
mov edx, dword [ebp - 0x30]
test eax, eax
jne 0x41d208
cmp dword [ebp - 0x30], 0xffffffff
jne 0x41da37
cmp dword [ebp + 8], 1
jne 0x41d637
mov eax, dword [0x436380]
mov dword [0x42520c], 0
mov dword [0x436378], 0
lea edx, [eax + 1]
mov dword [0x425214], edx
mov edx, dword [0x425210]
test edx, edx
jne 0x41da20
mov esi, 0x3f
jmp 0x41d0d1
mov eax, 0x1010
jmp 0x41d0bd
mov eax, dword [ebp - 0x3c]
mov ebx, esi
mov dword [0x436378], 0
test eax, eax
je 0x41d37b
mov eax, dword [ebp - 0x3c]
mov esi, dword [ebp - 0x2c]
mov dword [eax], esi
mov edx, dword [0x436380]
mov ecx, dword [0x436370]
lea eax, [edx + 1]
test ecx, ecx
mov dword [0x425214], eax
je 0x41d6f6
mov esi, dword [ebx + 4]
test esi, esi
je 0x41d49c
mov eax, dword [ebx + 8]
test eax, eax
je 0x41d50a
mov edx, dword [ebx + 0xc]
xor esi, esi
mov dword [eax], edx
lea esp, [ebp - 0xc]
mov eax, esi
pop ebx
pop esi
pop edi
pop ebp
ret
lea ecx, [eax - 1]
mov eax, dword [0x43637c]
mov dword [0x436378], 0
mov dword [0x436380], ecx
mov dword [ebp - 0x2c], eax
mov edx, dword [ebp - 0x2c]
cmp esi, edx
jge 0x41d04a
sub ecx, edx
mov dword [ebp - 0x30], esp
mov dword [ebp - 0x34], ecx
add ecx, 1
lea eax, [ecx*4 + 0x12]
shr eax, 4
shl eax, 4
call fcn.0041b3a0
sub esp, eax
test ecx, ecx
lea ebx, [esp + 0x10]
jle 0x41d7f3
lea edx, [edi + edx*4]
xor eax, eax
mov dword [ebp - 0x38], esi
lea esi, [esi]
mov esi, dword [edx + eax*4]
mov dword [ebx + eax*4], esi
add eax, 1
cmp eax, ecx
jne 0x41d420
mov edx, dword [ebp - 0x2c]
mov esi, dword [ebp - 0x38]
sub edx, 1
cmp esi, edx
mov dword [0x43637c], edx
jg 0x41d46b
mov eax, dword [ebp - 0x34]
mov dword [ebp - 0x2c], ecx
lea eax, [edi + eax*4]
lea esi, [esi]
mov ecx, dword [edi + edx*4]
mov dword [eax + edx*4 + 4], ecx
sub edx, 1
cmp esi, edx
jle 0x41d450
mov ecx, dword [ebp - 0x2c]
mov dword [0x43637c], edx
test ecx, ecx
jle 0x41d483
lea edx, [edi + esi*4]
xor eax, eax
mov dword [ebp - 0x2c], esi
mov esi, dword [ebx + eax*4]
mov dword [edx + eax*4], esi
add eax, 1
cmp ecx, eax
jg 0x41d473
mov esi, dword [ebp - 0x2c]
add esi, ecx
mov dword [0x436384], esi
mov ecx, dword [0x436380]
mov esp, dword [ebp - 0x30]
lea eax, [ecx + 1]
jmp 0x41d052
mov ecx, dword [0x425210]
test ecx, ecx
je 0x41d4f8
cmp dword [ebp + 8], 1
mov edx, 0x2d2d
mov eax, dword [edi]
mov word [ebp - 0x1b], dx
mov byte [ebp - 0x19], 0
je 0x41d4bf
mov byte [ebp - 0x1a], 0
mov dword [esp + 8], eax
mov eax, dword [sym.imp.msvcrt.dll__iob]
mov dword [esp + 4], str._s:
lea esi, [eax + 0x40]
mov dword [esp], esi
call sub.msvcrt.dll_fprintf
mov eax, dword [ebx]
mov dword [esp + 4], str.option___s_s_doesnt_accept_an_argument_n
mov dword [esp], esi
mov dword [esp + 0xc], eax
lea eax, [ebp - 0x1b]
mov dword [esp + 8], eax
call sub.msvcrt.dll_fprintf
mov eax, dword [ebx + 0xc]
mov esi, 0x3f
mov dword [0x42520c], eax
jmp 0x41d0d1
mov esi, dword [ebx + 0xc]
jmp 0x41d0d1
mov eax, dword [0x43637c]
mov dword [ebp - 0x2c], eax
jmp 0x41d3db
cmp al, 0x3a
mov edx, dword [ebp + 0x14]
jne 0x41d29e
movzx eax, byte [edx + 1]
add edx, 1
jmp 0x41d29e
cmp dword [ebp + 8], 2
je 0x41d795
mov eax, dword [0x425210]
test eax, eax
jne 0x41d7be
mov edi, dword [ebp - 0x2c]
test edi, edi
je 0x41daa7
mov eax, dword [ebp - 0x2c]
cmp byte [eax], 1
adc ecx, 0
mov dword [0x425214], ecx
lea esp, [ebp - 0xc]
mov esi, 0x3f
mov eax, esi
pop ebx
pop esi
pop edi
pop ebp
ret
mov dword [0x436370], edx
jmp 0x41d1d6
mov eax, dword [ebp - 0x2c]
mov dword [0x436370], eax
mov eax, dword [ebp - 0x30]
cmp byte [eax + 1], 0
jne 0x41d5ca
cmp byte [edx + 2], 0x3a
je 0x41d810
mov eax, dword [ebp + 0xc]
sub eax, ecx
cmp eax, 1
jle 0x41d870
mov eax, dword [ebp - 0x34]
mov dword [0x436380], eax
mov eax, dword [edi + eax*4]
mov dword [0x436370], eax
lea eax, [ecx + 2]
mov dword [ebp - 0x34], eax
mov dword [0x436378], 0
jmp 0x41d2c6
mov eax, dword [0x436380]
mov dword [0x436378], 0
mov esi, 1
lea edx, [eax + 1]
mov eax, dword [edi + eax*4]
mov dword [0x425214], edx
mov dword [0x436370], eax
jmp 0x41d0d1
cmp dword [ebp + 8], 1
jle 0x41d6e4
mov eax, dword [ebp + 0x18]
mov esi, dword [ebp + 0x1c]
mov dword [0x436370], 0
test eax, eax
mov dword [ebp - 0x34], eax
mov dword [ebp - 0x3c], esi
je 0x41d634
mov eax, dword [ebp - 0x34]
mov eax, dword [eax]
test eax, eax
jne 0x41d17d
mov dword [ebp - 0x40], edx
mov ebx, dword [ebp - 0x40]
test ebx, ebx
je 0x41d311
movzx ecx, byte [ebx]
test cl, cl
je 0x41d311
mov esi, dword [ebp + 0x14]
test esi, esi
je 0x41d311
mov eax, dword [ebp + 0x14]
movzx eax, byte [eax]
test al, al
mov byte [ebp - 0x2c], al
je 0x41d311
mov esi, dword [ebp + 0x14]
sub eax, 0x2b
add esi, 1
and eax, 0xfd
mov byte [ebp - 0x30], al
je 0x41d67f
mov esi, dword [ebp + 0x14]
lea eax, [esi + 1]
mov dword [ebp - 0x34], eax
add ebx, 1
cmp byte [ebp - 0x30], 0
movzx eax, byte [ebp - 0x2c]
jne 0x41d699
mov eax, dword [ebp + 0x14]
movzx eax, byte [eax + 1]
cmp al, 0x3a
mov edx, esi
jne 0x41d6af
jmp 0x41d6ed
add edx, 1
movzx eax, byte [edx]
test al, al
je 0x41d311
cmp cl, al
jne 0x41d6a1
cmp byte [edx + 1], 0x3a
je 0x41d6c0
movzx ecx, byte [ebx]
test cl, cl
jne 0x41d685
mov eax, dword [ebp + 0x14]
mov dword [esp + 8], edi
mov dword [esp + 0xc], eax
mov eax, dword [ebp + 0xc]
mov dword [esp + 4], eax
mov eax, dword [ebp + 8]
mov dword [esp], eax
call fcn.0041d000
mov esi, eax
jmp 0x41d0d1
mov dword [ebp + 8], 0
jmp 0x41d6c0
movzx eax, byte [esi + 1]
mov edx, dword [ebp - 0x34]
jmp 0x41d6af
cmp dword [ebx + 4], 1
jne 0x41d3a2
cmp dword [ebp + 0xc], eax
jg 0x41d8fe
mov eax, dword [ebp + 0x14]
movzx eax, byte [eax]
lea edx, [eax - 0x2b]
and edx, 0xfd
jne 0x41d721
mov eax, dword [ebp + 0x14]
movzx eax, byte [eax + 1]
cmp al, 0x3a
setne al
movzx eax, al
lea esi, [eax + eax*4 + 0x3a]
mov eax, dword [0x425210]
test eax, eax
je 0x41d788
cmp dword [ebp + 8], 1
mov eax, dword [edi]
mov edi, 0x2d2d
mov word [ebp - 0x1b], di
mov byte [ebp - 0x19], 0
je 0x41d74f
mov byte [ebp - 0x1a], 0
mov dword [esp + 8], eax
mov eax, dword [sym.imp.msvcrt.dll__iob]
mov dword [esp + 4], str._s:
lea edi, [eax + 0x40]
mov dword [esp], edi
call sub.msvcrt.dll_fprintf
mov eax, dword [ebx]
mov dword [esp + 4], str.option___s_s_requires_an_argument_n
mov dword [esp], edi
mov dword [esp + 0xc], eax
lea eax, [ebp - 0x1b]
mov dword [esp + 8], eax
call sub.msvcrt.dll_fprintf
mov eax, dword [ebx + 0xc]
mov dword [0x42520c], eax
jmp 0x41d0d1
mov eax, dword [0x425210]
test eax, eax
jne 0x41d8c4
mov dword [0x436378], 0
mov dword [0x42520c], 0
mov ecx, dword [ebp - 0x34]
jmp 0x41d56b
mov dword [esp + 0xc], esi
mov eax, dword [edi]
mov dword [esp + 4], str._s:_invalid_option_____c_n
mov dword [esp + 8], eax
mov eax, dword [sym.imp.msvcrt.dll__iob]
add eax, 0x40
mov dword [esp], eax
call sub.msvcrt.dll_fprintf
mov eax, dword [0x436378]
mov ecx, dword [0x436380]
mov dword [ebp - 0x2c], eax
jmp 0x41d557
mov edx, dword [ebp - 0x2c]
sub edx, 1
cmp esi, edx
mov dword [0x43637c], edx
jg 0x41d483
jmp 0x41d440
mov dword [0x436370], 0
jmp 0x41d5ca
mov edx, dword [0x436384]
cmp eax, edx
jle 0x41d857
lea esi, [edx*4 - 8]
lea eax, [edi + ecx*4]
mov ebx, dword [ebp - 0x2c]
mov dword [ebp - 0x2c], edx
lea ecx, [edi + esi]
mov edx, dword [eax]
sub eax, 4
mov dword [eax + 8], edx
cmp eax, ecx
jne 0x41d83c
mov edx, dword [ebp - 0x2c]
mov dword [edi + esi + 8], ebx
lea eax, [edx - 1]
mov dword [0x43637c], eax
add edx, 1
mov esi, 0xffffffff
mov dword [0x436384], edx
mov dword [0x425214], edx
jmp 0x41d0d1
mov eax, dword [0x425210]
test eax, eax
je 0x41d89b
mov dword [esp + 0xc], esi
mov eax, dword [edi]
mov dword [esp + 4], str._s:_option_requires_an_argument_____c_n
mov dword [esp + 8], eax
mov eax, dword [sym.imp.msvcrt.dll__iob]
add eax, 0x40
mov dword [esp], eax
call sub.msvcrt.dll_fprintf
mov eax, dword [ebp + 0x14]
movzx eax, byte [eax]
lea edx, [eax - 0x2b]
and edx, 0xfd
jne 0x41d8b3
mov eax, dword [ebp + 0x14]
movzx eax, byte [eax + 1]
cmp al, 0x3a
setne al
movzx eax, al
lea esi, [eax + eax*4 + 0x3a]
jmp 0x41d0d1
mov eax, dword [ebp - 0x30]
mov dword [0x436378], eax
mov dword [esp + 0xc], eax
mov eax, dword [edi]
mov dword [esp + 4], str._s:_unrecognised_option____s_n
mov dword [esp + 8], eax
mov eax, dword [sym.imp.msvcrt.dll__iob]
add eax, 0x40
mov dword [esp], eax
call sub.msvcrt.dll_fprintf
mov eax, dword [0x436380]
add eax, 1
mov dword [ebp - 0x34], eax
jmp 0x41d7a2
mov dword [0x436380], eax
mov eax, dword [edi + eax*4]
add edx, 2
mov dword [0x425214], edx
mov dword [0x436370], eax
jmp 0x41d3a2
cmp dword [ebp + 8], 2
jne 0x41d998
mov eax, dword [ebp - 0x40]
movzx ecx, byte [eax]
test cl, cl
je 0x41d998
mov esi, dword [ebp + 0x14]
test esi, esi
je 0x41d998
mov eax, dword [ebp + 0x14]
movzx esi, byte [eax]
mov eax, esi
test al, al
je 0x41d998
mov ebx, dword [ebp + 0x14]
lea eax, [esi - 0x2b]
add ebx, 1
and eax, 0xfd
mov byte [ebp - 0x2c], al
je 0x41d952
mov ebx, dword [ebp + 0x14]
lea eax, [ebx + 1]
mov dword [ebp - 0x30], eax
cmp byte [ebp - 0x2c], 0
mov eax, esi
jne 0x41d967
mov eax, dword [ebp + 0x14]
movzx eax, byte [eax + 1]
cmp al, 0x3a
mov edx, ebx
jne 0x41d97c
jmp 0x41d9f2
add edx, 1
movzx eax, byte [edx]
test al, al
je 0x41d998
cmp cl, al
jne 0x41d972
cmp byte [edx + 1], 0x3a
je 0x41d9fb
mov eax, dword [ebp - 0x38]
movzx ecx, byte [eax]
test cl, cl
je 0x41d9fb
add eax, 1
mov dword [ebp - 0x38], eax
jmp 0x41d958
mov eax, dword [0x436380]
mov ebx, dword [0x425210]
mov dword [0x42520c], 0
mov dword [0x436378], 0
lea edx, [eax + 1]
test ebx, ebx
mov dword [0x425214], edx
je 0x41d341
mov eax, dword [edi + eax*4]
mov dword [esp + 0xc], eax
mov eax, dword [edi]
mov dword [esp + 4], str._s:_option___s_is_ambiguous_n
mov dword [esp + 8], eax
mov eax, dword [sym.imp.msvcrt.dll__iob]
add eax, 0x40
mov dword [esp], eax
call sub.msvcrt.dll_fprintf
jmp 0x41d341
movzx eax, byte [ebx + 1]
mov edx, dword [ebp - 0x30]
jmp 0x41d97c
mov eax, dword [ebp + 0x14]
mov dword [esp + 8], edi
mov dword [esp + 0xc], eax
mov eax, dword [ebp + 0xc]
mov dword [esp], 2
mov dword [esp + 4], eax
call fcn.0041d000
mov esi, eax
jmp 0x41d0d1
mov eax, dword [edi + eax*4]
mov dword [esp + 0xc], eax
mov eax, dword [edi]
mov dword [esp + 4], str._s:_unrecognised_option___s_n
mov dword [esp + 8], eax
jmp 0x41d9dd
mov eax, dword [ebp - 0x30]
mov dword [ebp - 0x2c], eax
mov eax, dword [ebp - 0x3c]
mov dword [0x436378], 0
test eax, eax
je 0x41da53
mov esi, dword [ebp - 0x2c]
mov dword [eax], esi
mov edx, dword [0x436380]
mov ebx, dword [ebp - 0x2c]
mov ecx, dword [0x436370]
lea eax, [edx + 1]
shl ebx, 4
add ebx, dword [ebp - 0x34]
test ecx, ecx
mov dword [0x425214], eax
je 0x41daaf
mov eax, dword [ebx + 4]
test eax, eax
jne 0x41d3a2
cmp dword [0x425210], 0
mov eax, dword [edi]
je 0x41d4f8
cmp dword [ebp + 8], 1
mov word [ebp - 0x1b], 0x2d2d
mov byte [ebp - 0x19], 0
jne 0x41d4bb
jmp 0x41d4bf
add ecx, 1
jmp 0x41d56b
cmp dword [ebx + 4], 1
jne 0x41d3a2
cmp dword [ebp + 0xc], eax
jg 0x41d8fe
mov eax, dword [ebp + 0x14]
movzx eax, byte [eax]
mov byte [ebp - 0x2c], al
sub eax, 0x2b
and eax, 0xfffffffd
cmp al, 1
adc dword [ebp + 0x14], 0
mov eax, dword [ebp + 0x14]
cmp byte [eax], 0x3a
setne al
cmp dword [0x425210], 0
movzx eax, al
lea esi, [eax + eax*4 + 0x3a]
mov eax, dword [edi]
je 0x41d788
cmp dword [ebp + 8], 1
mov word [ebp - 0x1b], 0x2d2d
mov byte [ebp - 0x19], 0
jne 0x41d74b
jmp 0x41d74f