Function at 0x480280
Capabilities:
Query environment variable
Resolve function by parsing pe exports

Disassembly:
push ebp
push ebx
push edi
push esi
sub esp, 0x88
mov ebp, dword [esp + 0xa0]
mov esi, dword [esp + 0x9c]
push str.mintty
push dword [esi + 8]
call dword [sym.imp.api_ms_win_crt_string_l1_1_0.dll__stricmp]
add esp, 8
test eax, eax
je 0x4803bc
push 0x4faf23
push dword [esi + 8]
call dword [sym.imp.api_ms_win_crt_string_l1_1_0.dll__stricmp]
add esp, 8
test eax, eax
je 0x480445
cmp dword [esi + 4], 6
jb 0x480d42
push 6
push 0x4faf2f
push dword [esi + 8]
call dword [sym.imp.api_ms_win_crt_string_l1_1_0.dll__strnicmp]
add esp, 0xc
test eax, eax
jne 0x480d42
mov esi, dword [0x5052b0]
mov dword [esp + 0x14], 0
mov dword [esp + 0x18], 0
mov dword [esp + 0x1c], esi
mov dword [esp + 4], 0
mov dword [esp + 8], 0
mov dword [esp + 0xc], esi
push str.ConEmuDir
call sub.api_ms_win_crt_environment_l1_1_0.dll_getenv
add esp, 4
test eax, eax
je 0x480626
mov ebx, eax
push eax
call sub.api_ms_win_crt_string_l1_1_0.dll_strlen
add esp, 4
test eax, eax
je 0x480626
mov edi, eax
mov dword [esp], ebx
mov dword [esp + 0x10], eax
lea esi, [eax + 1]
mov eax, 0x20
nop word cs:[eax + eax]
mov ebp, eax
add eax, eax
cmp esi, ebp
ja 0x480360
push ebp
call sub.api_ms_win_crt_heap_l1_1_0.dll_malloc
add esp, 4
mov ebx, eax
mov byte [eax], 0
push dword [esp + 0x10]
push dword [esp + 4]
push eax
call sub.api_ms_win_crt_private_l1_1_0.dll_memcpy
add esp, 0xc
mov dword [esp], ebx
mov eax, dword [esp + 0x10]
mov byte [ebx + eax], 0
test ebp, ebp
je 0x4807ee
mov ecx, edi
not ecx
add ecx, ebp
mov eax, ebp
cmp ecx, 0xa
jbe 0x4807f3
mov ebx, ebp
mov ebp, dword [esp + 0xa0]
mov edi, dword [esp]
jmp 0x480873
mov dword [esp + 4], 0
mov dword [esp + 8], 0
mov eax, dword [0x5052b0]
mov dword [esp + 0xc], eax
mov dword [esp + 0x24], 0
mov dword [esp + 0x28], 0
mov dword [esp + 0x2c], eax
mov dword [esp + 0x34], str.Font
lea esi, [esp + 4]
mov dword [esp + 0x38], esi
mov dword [esp + 0x3c], str.FontHeight
lea edi, [esp + 0x24]
mov dword [esp + 0x40], edi
lea eax, [esp + 0x34]
push eax
push 2
push str.mintty_config
push 0x507658
call fcn.0041a220
add esp, 0x10
test al, al
je 0x4804de
cmp dword [esp + 8], 0
je 0x48051a
cmp dword [esp + 0x28], 0
jne 0x48076a
jmp 0x480702
xorps xmm0, xmm0
movups xmmword [esp + 0x78], xmm0
movups xmmword [esp + 0x68], xmm0
movups xmmword [esp + 0x58], xmm0
movups xmmword [esp + 0x48], xmm0
movups xmmword [esp + 0x38], xmm0
mov dword [esp + 0x34], 0x54
push 0xfffffffffffffff5
call dword [sym.imp.KERNEL32.dll_GetStdHandle]
lea ecx, [esp + 0x34]
push ecx
push 0
push eax
call dword [sym.imp.KERNEL32.dll_GetCurrentConsoleFontEx]
test eax, eax
je 0x480567
lea ebp, [esp + 0x48]
push ebp
call sub.api_ms_win_crt_string_l1_1_0.dll_wcslen
add esp, 4
test eax, eax
je 0x4805b9
mov edi, eax
sub esp, 0x20
xorps xmm0, xmm0
movups xmmword [esp + 0x10], xmm0
mov dword [esp + 0xc], eax
mov dword [esp + 8], ebp
mov dword [esp + 4], 0
mov dword [esp], 0xfde9
call dword [sym.imp.KERNEL32.dll_WideCharToMultiByte]
mov ebx, eax
inc eax
sete byte [esp]
jne 0x4805c3
mov esi, dword [0x5052b0]
jmp 0x4805d1
mov dword [esp + 0x14], str.Font
mov dword [esp + 0x18], esi
mov dword [esp + 0x1c], str.FontHeight
mov dword [esp + 0x20], edi
lea eax, [esp + 0x14]
push eax
push 2
push str..minttyrc
push 0x507658
call fcn.0041a220
add esp, 0x10
cmp dword [esp + 8], 0
jne 0x480435
mov eax, dword [esp + 4]
test eax, eax
je 0x480532
cmp eax, 0xf
jae 0x4806b3
mov ecx, eax
cmp eax, 1
ja 0x480540
mov ecx, 0x20
nop word [eax + eax]
mov esi, ecx
add ecx, ecx
cmp esi, 0xf
jb 0x480540
test eax, eax
je 0x4806bb
push esi
push dword [esp + 0x10]
call sub.api_ms_win_crt_heap_l1_1_0.dll_realloc
add esp, 8
mov ecx, dword [esp + 8]
jmp 0x4806c9
mov eax, dword [ebp]
mov edi, dword [ebp + 4]
test eax, eax
je 0x480580
mov ecx, edi
not ecx
add ecx, eax
cmp ecx, 0x20
jae 0x480730
cmp eax, 2
mov ecx, 0x20
cmovae ecx, eax
lea edx, [edi + 0x21]
nop
mov ebx, ecx
add ecx, ecx
cmp edx, ebx
ja 0x480590
test eax, eax
je 0x4807c5
push ebx
push dword [ebp + 8]
call sub.api_ms_win_crt_heap_l1_1_0.dll_realloc
add esp, 8
mov esi, eax
mov dword [ebp + 8], eax
mov edi, dword [ebp + 4]
jmp 0x480823
mov bl, 1
mov esi, dword [0x5052b0]
jmp 0x4805ee
push eax
call sub.api_ms_win_crt_heap_l1_1_0.dll_malloc
add esp, 4
mov esi, eax
mov byte [eax], 0
push 0
push 0
push ebx
push esi
push edi
push ebp
push 0
push 0xfde9
call dword [sym.imp.KERNEL32.dll_WideCharToMultiByte]
mov byte [esi + ebx], 0
movzx ebx, byte [esp]
movsx eax, word [esp + 0x3e]
lea edi, [esp + 0x14]
push 0xa
push edi
push eax
call dword [sym.imp.api_ms_win_crt_convert_l1_1_0.dll__ultoa]
add esp, 0xc
mov eax, dword [esp + 0xa0]
add eax, 0xc
push edi
push esi
push eax
call fcn.00414f20
add esp, 0xc
test bl, bl
je 0x480d39
jmp 0x480d42
mov dword [esp], esi
xor ebx, ebx
mov al, 1
mov dword [esp + 0x10], eax
push str.ConEmuBaseDir
call sub.api_ms_win_crt_environment_l1_1_0.dll_getenv
add esp, 4
mov esi, eax
test esi, esi
je 0x4809d9
push esi
call sub.api_ms_win_crt_string_l1_1_0.dll_strlen
add esp, 4
test eax, eax
je 0x4809d9
mov edi, eax
lea eax, [ebx - 1]
cmp eax, edi
setae al
mov edx, dword [esp + 0x10]
mov ecx, edx
not cl
test cl, al
mov dword [esp + 0x30], esi
jne 0x4807e6
cmp ebx, 2
mov eax, 0x20
cmovae eax, ebx
lea ecx, [edi + 1]
nop word cs:[eax + eax]
mov ebx, eax
add eax, eax
cmp ecx, ebx
ja 0x480690
test dl, dl
je 0x4808f9
push ebx
call sub.api_ms_win_crt_heap_l1_1_0.dll_malloc
add esp, 4
mov esi, eax
mov byte [eax], 0
jmp 0x480908
xor ecx, ecx
mov eax, dword [esp + 0xc]
jmp 0x4806d1
push esi
call sub.api_ms_win_crt_heap_l1_1_0.dll_malloc
add esp, 4
mov byte [eax], 0
xor ecx, ecx
mov dword [esp + 0xc], eax
mov dword [esp + 4], esi
mov word [eax + ecx + 0xc], 0x656c
mov dword [eax + ecx + 8], 0x6f736e6f
mov dword [eax + ecx + 4], 0x43206164
mov dword [eax + ecx], 0x6963754c
lea edx, [ecx + 0xe]
mov dword [esp + 8], edx
mov byte [eax + ecx + 0xe], 0
cmp dword [esp + 0x28], 0
jne 0x48076a
mov eax, dword [esp + 0x24]
cmp eax, 2
jae 0x480723
test eax, eax
je 0x480738
push 0x20
push dword [esp + 0x30]
call sub.api_ms_win_crt_heap_l1_1_0.dll_realloc
add esp, 8
mov ecx, dword [esp + 0x28]
jmp 0x480747
xor ecx, ecx
mov edx, 1
mov eax, dword [esp + 0x2c]
jmp 0x480756
mov esi, dword [ebp + 8]
jmp 0x480826
push 0x20
call sub.api_ms_win_crt_heap_l1_1_0.dll_malloc
add esp, 4
mov byte [eax], 0
xor ecx, ecx
mov dword [esp + 0x2c], eax
mov dword [esp + 0x24], 0x20
lea edx, [ecx + 1]
mov dword [esp + 0x28], edx
mov byte [eax + ecx], 0x39
mov eax, dword [esp + 0x28]
mov ecx, dword [esp + 0x2c]
mov byte [ecx + eax], 0
add ebp, 0xc
push dword [esp + 0x2c]
push dword [esp + 0x10]
push ebp
call fcn.00414f20
add esp, 0xc
cmp dword [esp + 0x24], 0
mov dword [esp + 0x28], 0
je 0x4807a1
mov dword [esp + 0x24], 0
push dword [esp + 0x2c]
call sub.api_ms_win_crt_heap_l1_1_0.dll_free
add esp, 4
cmp dword [esp + 4], 0
mov dword [esp + 8], 0
je 0x480d42
mov dword [esp + 4], 0
push dword [esp + 0xc]
jmp 0x480d3a
push ebx
call sub.api_ms_win_crt_heap_l1_1_0.dll_malloc
add esp, 4
mov esi, eax
test edi, edi
je 0x48081d
lea eax, [edi + 1]
push eax
push dword [ebp + 8]
push esi
call sub.api_ms_win_crt_private_l1_1_0.dll_memcpy
add esp, 0xc
jmp 0x480820
mov esi, dword [esp]
jmp 0x480908
mov eax, 0x20
add edi, 0xc
nop word cs:[eax + eax]
mov ebx, eax
add eax, eax
cmp edi, ebx
ja 0x480800
test ebp, ebp
je 0x480853
push ebx
push dword [esp + 4]
call sub.api_ms_win_crt_heap_l1_1_0.dll_realloc
add esp, 8
mov edi, eax
jmp 0x48086c
mov byte [esi], 0
mov dword [ebp + 8], esi
mov dword [ebp], ebx
movups xmm0, xmmword [0x4faf7f]
movups xmmword [esi + edi + 0x10], xmm0
movups xmm0, xmmword [str.GetCurrentConsoleFontEx___failed]
movups xmmword [esi + edi], xmm0
mov eax, dword [ebp + 4]
mov ecx, dword [ebp + 8]
lea edx, [eax + 0x20]
mov dword [ebp + 4], edx
mov byte [ecx + eax + 0x20], 0
jmp 0x480d42
push ebx
call sub.api_ms_win_crt_heap_l1_1_0.dll_malloc
add esp, 4
mov edi, eax
push esi
push dword [esp + 4]
push eax
call sub.api_ms_win_crt_private_l1_1_0.dll_memcpy
add esp, 0xc
mov ebp, dword [esp + 0xa0]
mov eax, dword [esp + 0x10]
mov dword [edi + eax + 7], 0x6c6d782e
mov dword [edi + eax + 4], 0x2e756d45
mov dword [edi + eax], 0x6e6f432f
mov byte [edi + eax + 0xb], 0
mov dword [esp + 0x34], str._value_name_FontName__type_string__data_
lea eax, [esp + 0x14]
mov dword [esp + 0x38], eax
mov dword [esp + 0x3c], str._value_name_FontSize__type_ulong__data_
lea eax, [esp + 4]
mov dword [esp + 0x40], eax
lea eax, [esp + 0x34]
push eax
push 2
mov dword [esp + 8], edi
push edi
call fcn.0041a090
add esp, 0xc
test al, al
jne 0x480b65
push str.ConEmuBaseDir
call sub.api_ms_win_crt_environment_l1_1_0.dll_getenv
add esp, 4
mov esi, eax
test ebx, ebx
je 0x480a6d
mov eax, dword [esp]
mov byte [eax], 0
mov dword [esp + 0x10], 0
jmp 0x480640
push ebx
push dword [esp + 4]
call sub.api_ms_win_crt_heap_l1_1_0.dll_realloc
add esp, 8
mov esi, eax
push edi
push dword [esp + 0x34]
push esi
call sub.api_ms_win_crt_private_l1_1_0.dll_memcpy
add esp, 0xc
mov byte [esi + edi], 0
test ebx, ebx
je 0x480929
mov eax, edi
not eax
add eax, ebx
cmp eax, 0xa
ja 0x48095b
mov dword [esp], esi
cmp ebx, 2
mov eax, 0x20
cmovae eax, ebx
lea ecx, [edi + 0xc]
nop word [eax + eax]
mov esi, eax
add eax, eax
cmp ecx, esi
ja 0x480940
test ebx, ebx
je 0x480961
push esi
push dword [esp + 4]
call sub.api_ms_win_crt_heap_l1_1_0.dll_realloc
add esp, 8
jmp 0x48097f
mov eax, esi
mov esi, ebx
jmp 0x48097f
push esi
call sub.api_ms_win_crt_heap_l1_1_0.dll_malloc
add esp, 4
mov ebx, eax
mov eax, edi
inc eax
push eax
push dword [esp + 4]
push ebx
call sub.api_ms_win_crt_private_l1_1_0.dll_memcpy
add esp, 0xc
mov eax, ebx
mov dword [eax + edi + 7], 0x6c6d782e
mov dword [eax + edi + 4], 0x2e756d45
mov dword [eax + edi], 0x6e6f432f
mov byte [eax + edi + 0xb], 0
mov dword [esp + 0x34], str._value_name_FontName__type_string__data_
lea ecx, [esp + 0x14]
mov dword [esp + 0x38], ecx
mov dword [esp + 0x3c], str._value_name_FontSize__type_ulong__data_
lea ecx, [esp + 4]
mov dword [esp + 0x40], ecx
lea ecx, [esp + 0x34]
push ecx
push 2
mov dword [esp + 8], eax
push eax
call fcn.0041a090
add esp, 0xc
mov ebx, esi
test al, al
jne 0x480b65
push str.APPDATA
call sub.api_ms_win_crt_environment_l1_1_0.dll_getenv
add esp, 4
mov esi, eax
test ebx, ebx
je 0x4809f4
mov eax, dword [esp]
mov byte [eax], 0
jmp 0x4809fc
mov eax, dword [0x5052b0]
mov dword [esp], eax
test esi, esi
je 0x480b65
push esi
call sub.api_ms_win_crt_string_l1_1_0.dll_strlen
add esp, 4
test eax, eax
je 0x480b65
mov edi, eax
mov eax, ebx
sub eax, 1
jb 0x480a37
cmp eax, edi
jb 0x480a37
push edi
push esi
mov esi, dword [esp + 8]
push esi
call sub.api_ms_win_crt_private_l1_1_0.dll_memcpy
add esp, 0xc
mov byte [esi + edi], 0
jmp 0x480aae
cmp ebx, 2
mov eax, 0x20
cmovae eax, ebx
lea ecx, [edi + 1]
nop word cs:[eax + eax]
mov ebp, eax
add eax, eax
cmp ecx, ebp
ja 0x480a50
test ebx, ebx
je 0x480a82
push ebp
push dword [esp + 4]
call sub.api_ms_win_crt_heap_l1_1_0.dll_realloc
add esp, 8
mov ebx, eax
jmp 0x480a90
xor ebx, ebx
mov al, 1
mov dword [esp + 0x10], eax
mov eax, dword [0x5052b0]
mov dword [esp], eax
jmp 0x480640
push ebp
call sub.api_ms_win_crt_heap_l1_1_0.dll_malloc
add esp, 4
mov ebx, eax
mov byte [eax], 0
push edi
push esi
push ebx
call sub.api_ms_win_crt_private_l1_1_0.dll_memcpy
add esp, 0xc
mov byte [ebx + edi], 0
test ebp, ebp
mov esi, ebx
je 0x480ac2
mov ebx, ebp
mov ebp, dword [esp + 0xa0]
mov eax, edi
not eax
add eax, ebx
cmp eax, 0xa
ja 0x480b15
xor eax, eax
cmp ebx, 1
jbe 0x480acb
jmp 0x480ad0
mov al, 1
mov ebp, dword [esp + 0xa0]
mov ebx, 0x20
lea ecx, [edi + 0xc]
mov edx, ebx
nop word cs:[eax + eax]
mov ebx, edx
add edx, edx
cmp ecx, ebx
ja 0x480ae0
test al, al
je 0x480b09
push ebx
call sub.api_ms_win_crt_heap_l1_1_0.dll_malloc
add esp, 4
mov ecx, esi
mov esi, eax
mov eax, edi
inc eax
push eax
push ecx
push esi
call sub.api_ms_win_crt_private_l1_1_0.dll_memcpy
add esp, 0xc
jmp 0x480b15
push ebx
push esi
call sub.api_ms_win_crt_heap_l1_1_0.dll_realloc
add esp, 8
mov esi, eax
mov dword [esi + edi + 7], 0x6c6d782e
mov dword [esi + edi + 4], 0x2e756d45
mov dword [esi + edi], 0x6e6f432f
mov byte [esi + edi + 0xb], 0
mov dword [esp + 0x34], str._value_name_FontName__type_string__data_
lea eax, [esp + 0x14]
mov dword [esp + 0x38], eax
mov dword [esp + 0x3c], str._value_name_FontSize__type_ulong__data_
lea eax, [esp + 4]
mov dword [esp + 0x40], eax
lea eax, [esp + 0x34]
push eax
push 2
mov dword [esp + 8], esi
push esi
call fcn.0041a090
add esp, 0xc
mov esi, dword [esp + 0x18]
mov eax, dword [esp + 8]
or eax, esi
jne 0x480bc9
mov eax, dword [ebp]
mov edx, dword [ebp + 4]
test eax, eax
je 0x480b8a
mov ecx, edx
not ecx
add ecx, eax
cmp ecx, 0x1a
jae 0x480c8d
cmp eax, 2
mov ecx, 0x20
cmovae ecx, eax
mov dword [esp + 0x10], edx
add edx, 0x1b
nop dword [eax]
mov esi, ecx
add ecx, ecx
cmp edx, esi
ja 0x480ba0
test eax, eax
je 0x480c92
push esi
push dword [ebp + 8]
call sub.api_ms_win_crt_heap_l1_1_0.dll_realloc
add esp, 8
mov edi, eax
mov dword [ebp + 8], eax
mov edx, dword [ebp + 4]
jmp 0x480cc1
test esi, esi
je 0x480c09
mov ebp, dword [esp + 0x1c]
mov ecx, esi
mov eax, esi
nop word cs:[eax + eax]
sub eax, 1
jb 0x480c1d
cmp byte [ebp + ecx - 1], 0x22
mov ecx, eax
jne 0x480be0
cmp esi, eax
jbe 0x480c1d
cmp dword [esp + 0x14], 0
je 0x480d4d
add ebp, eax
mov dword [esp + 0x18], eax
mov byte [ebp], 0
jmp 0x480c1d
lea eax, [esp + 0x14]
push str.Consola
push 7
push eax
call fcn.00472620
add esp, 0xc
mov esi, dword [esp + 8]
test esi, esi
je 0x480c59
mov ebp, dword [esp + 0xc]
mov ecx, esi
mov eax, esi
nop dword [eax]
sub eax, 1
jb 0x480c6d
cmp byte [ebp + ecx - 1], 0x22
mov ecx, eax
jne 0x480c30
cmp esi, eax
jbe 0x480c6d
cmp dword [esp + 4], 0
je 0x480d94
add ebp, eax
mov dword [esp + 8], eax
mov byte [ebp], 0
jmp 0x480c6d
lea eax, [esp + 4]
push 0x4fb036
push 2
push eax
call fcn.00472620
add esp, 0xc
mov eax, dword [esp + 0xa0]
add eax, 0xc
push dword [esp + 0xc]
push dword [esp + 0x20]
push eax
call fcn.00414f20
add esp, 0xc
mov esi, dword [esp]
jmp 0x480cef
mov edi, dword [ebp + 8]
jmp 0x480cc4
push esi
call sub.api_ms_win_crt_heap_l1_1_0.dll_malloc
add esp, 4
mov edi, eax
mov edx, dword [esp + 0x10]
test edx, edx
je 0x480cbb
lea eax, [edx + 1]
push eax
push dword [ebp + 8]
push edi
call sub.api_ms_win_crt_private_l1_1_0.dll_memcpy
mov edx, dword [esp + 0x1c]
add esp, 0xc
jmp 0x480cbe
mov byte [edi], 0
mov dword [ebp + 8], edi
mov dword [ebp], esi
mov esi, dword [esp]
movups xmm0, xmmword [0x4fb01d]
movups xmmword [edi + edx + 0xa], xmm0
movups xmm0, xmmword [str.Failed_to_parse_ConEmu.xml]
movups xmmword [edi + edx], xmm0
mov eax, dword [ebp + 4]
mov ecx, dword [ebp + 8]
lea edx, [eax + 0x1a]
mov dword [ebp + 4], edx
mov byte [ecx + eax + 0x1a], 0
cmp dword [esp + 4], 0
mov dword [esp + 8], 0
je 0x480d12
mov dword [esp + 4], 0
push dword [esp + 0xc]
call sub.api_ms_win_crt_heap_l1_1_0.dll_free
add esp, 4
cmp dword [esp + 0x14], 0
mov dword [esp + 0x18], 0
je 0x480d35
mov dword [esp + 0x14], 0
push dword [esp + 0x1c]
call sub.api_ms_win_crt_heap_l1_1_0.dll_free
add esp, 4
test ebx, ebx
je 0x480d42
push esi
call sub.api_ms_win_crt_heap_l1_1_0.dll_free
add esp, 4
add esp, 0x88
pop esi
pop edi
pop ebx
pop ebp
ret
mov dword [esp + 0x18], 0
lea eax, [esi + 1]
mov ecx, 0x20
mov edi, ecx
add ecx, ecx
cmp eax, edi
ja 0x480d5d
push edi
call sub.api_ms_win_crt_heap_l1_1_0.dll_malloc
add esp, 4
mov byte [eax], 0
mov dword [esp + 0x1c], eax
mov dword [esp + 0x14], edi
push esi
push ebp
push eax
mov edi, eax
call sub.api_ms_win_crt_private_l1_1_0.dll_memcpy
add esp, 0xc
mov dword [esp + 0x18], esi
add edi, esi
mov byte [edi], 0
jmp 0x480c1d
mov dword [esp + 8], 0
lea eax, [esi + 1]
mov ecx, 0x20
mov edi, ecx
add ecx, ecx
cmp eax, edi
ja 0x480da4
push edi
call sub.api_ms_win_crt_heap_l1_1_0.dll_malloc
add esp, 4
mov byte [eax], 0
mov dword [esp + 0xc], eax
mov dword [esp + 4], edi
push esi
push ebp
push eax
mov edi, eax
call sub.api_ms_win_crt_private_l1_1_0.dll_memcpy
add esp, 0xc
mov dword [esp + 8], esi
add edi, esi
mov byte [edi], 0
jmp 0x480c6d