Function at 0x4b0020
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
mov eax, 0x104c
call fcn.004ca2e0
push esi
xor esi, esi
push edi
mov edi, ecx
mov dword [ebp - 8], edi
mov dword [ebp - 0x24], esi
mov dword [ebp - 0xc], esi
mov dword [ebp - 0x18], esi
mov dword [ebp - 0x10], esi
call dword [sym.imp.KERNEL32.dll_GetCurrentProcessId]
push eax
lea eax, [ebp - 0x4c]
push 0x4e4bb8
push eax
call dword [sym.imp.USER32.dll_wsprintfW]
lea ecx, [ebp - 0x2c]
push 0x505f00
push ecx
call fcn.00447160
add esp, 0x14
cmp dword [0x52fe2c], esi
jne 0x4b0088
push esi
push str.CreateBatchFile_failed__gpConEmuNULL
mov ecx, edi
call fcn.004aec80
pop edi
mov eax, esi
pop esi
mov esp, ebp
pop ebp
ret 4
mov eax, dword [edi + 0x28]
mov ecx, dword [eax + 0x2c]
lea edx, [ebp - 0xc]
push edx
push str.ConEmuUpdate.cmd
push ecx
mov ecx, edi
call fcn.004af900
mov dword [ebp - 0x1c], eax
cmp eax, esi
je 0x4b0a6b
mov edi, dword [sym.imp.KERNEL32.dll_lstrlenA]
push ebx
push str._echo_off_r_n
call edi
mov ebx, dword [sym.imp.KERNEL32.dll_WriteFile]
push 0
lea edx, [ebp - 4]
push edx
mov esi, eax
mov eax, dword [ebp - 0xc]
push esi
push str._echo_off_r_n
push eax
call ebx
test eax, eax
je 0x4b0a17
cmp esi, dword [ebp - 4]
jne 0x4b0a17
push 0
push 0
push 0x1000
lea ecx, [ebp - 0x104c]
push ecx
push 0xffffffffffffffff
push str._r_nset_ConEmuInUpdateYES_r_n
push 0
push 1
call dword [sym.imp.KERNEL32.dll_WideCharToMultiByte]
test eax, eax
jne 0x4b0126
push str._r_nset_ConEmuInUpdateYES_r_n
call dword [sym.imp.KERNEL32.dll_lstrlenW]
mov ecx, dword [ebp - 8]
push eax
push str.WideCharToMultiByte_failed__len_i
call fcn.004aec80
jmp 0x4b0a57
lea edx, [ebp - 0x104c]
push edx
call edi
mov edx, dword [ebp - 0xc]
push 0
mov esi, eax
lea eax, [ebp - 4]
push eax
push esi
lea ecx, [ebp - 0x104c]
push ecx
push edx
call ebx
test eax, eax
je 0x4b0a17
cmp esi, dword [ebp - 4]
jne 0x4b0a17
push str.cd__d__
call edi
mov ecx, dword [ebp - 0xc]
push 0
mov esi, eax
lea eax, [ebp - 4]
push eax
push esi
push str.cd__d__
push ecx
call ebx
test eax, eax
je 0x4b0a17
cmp esi, dword [ebp - 4]
jne 0x4b0a17
mov eax, dword [0x52fe2c]
push 0
push 0
push 0x1000
lea edx, [ebp - 0x104c]
push edx
push 0xffffffffffffffff
add eax, 0x3be
push eax
push 0
push 1
call dword [sym.imp.KERNEL32.dll_WideCharToMultiByte]
test eax, eax
jne 0x4b01d3
mov ecx, dword [0x52fe2c]
add ecx, 0x3be
push ecx
call dword [sym.imp.KERNEL32.dll_lstrlenW]
mov ecx, dword [ebp - 8]
push eax
push str.WideCharToMultiByte_failed__len_i
call fcn.004aec80
jmp 0x4b0a57
lea edx, [ebp - 0x104c]
push edx
call edi
mov edx, dword [ebp - 0xc]
push 0
mov esi, eax
lea eax, [ebp - 4]
push eax
push esi
lea ecx, [ebp - 0x104c]
push ecx
push edx
call ebx
test eax, eax
je 0x4b0a17
cmp esi, dword [ebp - 4]
jne 0x4b0a17
push str.__r_necho_Current_folder_r_ncd_r_necho_._r_n_r_necho_Starting_update..._r_n
call edi
mov ecx, dword [ebp - 0xc]
push 0
mov esi, eax
lea eax, [ebp - 4]
push eax
push esi
push str.__r_necho_Current_folder_r_ncd_r_necho_._r_n_r_necho_Starting_update..._r_n
push ecx
call ebx
test eax, eax
je 0x4b0a17
cmp esi, dword [ebp - 4]
jne 0x4b0a17
mov esi, dword [ebp - 8]
mov ecx, dword [esi + 0x28]
call fcn.004b2b00
mov ecx, dword [esi + 0x28]
cmp al, 1
jne 0x4b0248
call fcn.004b29c0
jmp 0x4b024d
call fcn.004b29e0
mov dword [ebp - 0x20], eax
mov dword [ebp - 0x14], 0
cmp dword [ebp - 0x14], 0
je 0x4b0278
mov eax, dword [ebp - 0x10]
test eax, eax
je 0x4b052e
lea edx, [eax + eax + 2]
push edx
call fcn.0044c4d0
add esp, 4
mov dword [ebp - 0x18], eax
mov ebx, dword [ebp - 0x20]
cmp word [ebx], 0
mov edi, dword [ebp - 0x18]
je 0x4b0347
jmp 0x4b0290
movzx eax, word [ebx]
cmp ax, 0x25
je 0x4b02b2
cmp dword [ebp - 0x14], 0
je 0x4b02aa
mov word [edi], ax
add edi, 2
jmp 0x4b033a
inc dword [ebp - 0x10]
jmp 0x4b033a
movzx eax, word [ebx + 2]
add ebx, 2
add eax, 0xffffffdb
cmp eax, 0xf
ja case.0x4b02c8.38
movzx eax, byte [eax + 0x4b0aa4]
jmp dword [eax*4 + 0x4b0a8c]
mov edx, 0x501054
jmp 0x4b02dd
mov edx, dword [ebp + 8]
test edx, edx
je 0x4b033a
mov eax, edx
lea esi, [eax + 2]
mov cx, word [eax]
add eax, 2
test cx, cx
jne 0x4b02e2
sub eax, esi
sar eax, 1
cmp dword [ebp - 0x14], 0
mov esi, eax
je 0x4b0337
push edx
lea edx, [esi + 1]
push edx
push edi
call fcn.00401730
lea edi, [edi + esi*2]
jmp 0x4b033a
mov edx, dword [0x52fe2c]
add edx, 0x3be
jmp 0x4b02d9
lea edx, [ebp - 0x2c]
jmp 0x4b02dd
lea edx, [ebp - 0x4c]
jmp 0x4b02dd
sub ebx, 2
cmp dword [ebp - 0x14], 0
je 0x4b02aa
mov ecx, 0x25
mov word [edi], cx
add edi, 2
jmp 0x4b033a
add dword [ebp - 0x10], esi
add ebx, 2
cmp word [ebx], 0
jne 0x4b0290
mov eax, dword [ebp - 0x14]
test eax, eax
je 0x4b0353
xor ecx, ecx
mov word [edi], cx
inc eax
cmp eax, 2
mov dword [ebp - 0x14], eax
jl 0x4b0257
push str.echo
call dword [sym.imp.KERNEL32.dll_lstrlenA]
mov ebx, dword [ebp - 0xc]
mov edi, dword [sym.imp.KERNEL32.dll_WriteFile]
push 0
mov esi, eax
lea eax, [ebp - 4]
push eax
push esi
push str.echo
push ebx
call edi
test eax, eax
je 0x4b0a2d
cmp esi, dword [ebp - 4]
jne 0x4b0a2d
mov esi, dword [ebp - 0x18]
push 0
push 0
push 0x1000
lea ecx, [ebp - 0x104c]
push ecx
push 0xffffffffffffffff
push esi
push 0
push 1
call dword [sym.imp.KERNEL32.dll_WideCharToMultiByte]
test eax, eax
je 0x4b0989
lea edx, [ebp - 0x104c]
push edx
call dword [sym.imp.KERNEL32.dll_lstrlenA]
push 0
mov esi, eax
lea eax, [ebp - 4]
push eax
push esi
lea ecx, [ebp - 0x104c]
push ecx
push ebx
call edi
test eax, eax
je 0x4b0a2d
cmp esi, dword [ebp - 4]
jne 0x4b0a2d
push str._r_ncall
call dword [sym.imp.KERNEL32.dll_lstrlenA]
push 0
lea edx, [ebp - 4]
push edx
mov esi, eax
push esi
push str._r_ncall
push ebx
call edi
test eax, eax
je 0x4b0a2d
cmp esi, dword [ebp - 4]
jne 0x4b0a2d
mov esi, dword [ebp - 0x18]
push 0
push 0
push 0x1000
lea eax, [ebp - 0x104c]
push eax
push 0xffffffffffffffff
push esi
push 0
push 1
call dword [sym.imp.KERNEL32.dll_WideCharToMultiByte]
test eax, eax
je 0x4b0989
lea ecx, [ebp - 0x104c]
push ecx
call dword [sym.imp.KERNEL32.dll_lstrlenA]
push 0
lea edx, [ebp - 4]
push edx
mov esi, eax
push esi
lea eax, [ebp - 0x104c]
push eax
push ebx
call edi
test eax, eax
je 0x4b0a2d
cmp esi, dword [ebp - 4]
jne 0x4b0a2d
push str._r_nif_errorlevel_1_goto_err_r_n
call dword [sym.imp.KERNEL32.dll_lstrlenA]
push 0
lea ecx, [ebp - 4]
push ecx
mov esi, eax
push esi
push str._r_nif_errorlevel_1_goto_err_r_n
push ebx
call edi
test eax, eax
je 0x4b0a2d
cmp esi, dword [ebp - 4]
jne 0x4b0a2d
mov edx, dword [ebp - 8]
mov eax, dword [edx + 0x28]
mov eax, dword [eax + 0x28]
test eax, eax
je 0x4b05bd
cmp word [eax], 0
je 0x4b05bd
push 0x4ffc5c
call dword [sym.imp.KERNEL32.dll_lstrlenA]
push 0
lea ecx, [ebp - 4]
push ecx
mov esi, eax
push esi
push 0x4ffc5c
push ebx
call edi
test eax, eax
je 0x4b0a2d
cmp esi, dword [ebp - 4]
jne 0x4b0a2d
mov esi, dword [ebp - 8]
mov eax, dword [esi + 0x28]
mov ecx, dword [eax + 0x28]
push 0
push 0
push 0x1000
lea edx, [ebp - 0x104c]
push edx
push 0xffffffffffffffff
push ecx
push 0
push 1
call dword [sym.imp.KERNEL32.dll_WideCharToMultiByte]
test eax, eax
jne 0x4b055f
mov edx, dword [esi + 0x28]
mov eax, dword [edx + 0x28]
push eax
call dword [sym.imp.KERNEL32.dll_lstrlenW]
push eax
push str.WideCharToMultiByte_failed__len_i
mov ecx, esi
jmp 0x4b0a3c
mov esi, dword [ebp - 8]
mov ecx, dword [esi + 0x28]
call fcn.004b2b00
cmp al, 1
mov eax, 0x4fcea8
je 0x4b0547
mov eax, 0x505d78
mov edx, dword [ebp - 0x20]
push 0
push edx
push eax
push str.Invalid__s_update_command___s_
mov ecx, esi
call fcn.004aed60
jmp 0x4b0a41
lea ecx, [ebp - 0x104c]
push ecx
call dword [sym.imp.KERNEL32.dll_lstrlenA]
push 0
lea edx, [ebp - 4]
push edx
mov esi, eax
push esi
lea eax, [ebp - 0x104c]
push eax
push ebx
call edi
test eax, eax
je 0x4b0a2d
cmp esi, dword [ebp - 4]
jne 0x4b0a2d
push 0x4ffc5c
call dword [sym.imp.KERNEL32.dll_lstrlenA]
push 0
lea ecx, [ebp - 4]
push ecx
mov esi, eax
push esi
push 0x4ffc5c
push ebx
call edi
test eax, eax
je 0x4b0a2d
cmp esi, dword [ebp - 4]
jne 0x4b0a2d
push 0
push 0
push 0x1000
lea edx, [ebp - 0x104c]
push edx
push 0xffffffffffffffff
push str._r_nset_ConEmuInUpdate_r_n
push 0
push 1
call dword [sym.imp.KERNEL32.dll_WideCharToMultiByte]
test eax, eax
jne 0x4b05f8
push str._r_nset_ConEmuInUpdate_r_n
call dword [sym.imp.KERNEL32.dll_lstrlenW]
push eax
push str.WideCharToMultiByte_failed__len_i
jmp 0x4b0a39
lea eax, [ebp - 0x104c]
push eax
call dword [sym.imp.KERNEL32.dll_lstrlenA]
push 0
lea ecx, [ebp - 4]
push ecx
mov esi, eax
push esi
lea edx, [ebp - 0x104c]
push edx
push ebx
call edi
test eax, eax
je 0x4b0a2d
cmp esi, dword [ebp - 4]
jne 0x4b0a2d
push str._r_necho_Starting_ConEmu..._r_nstart__ConEmu___
call dword [sym.imp.KERNEL32.dll_lstrlenA]
push 0
mov esi, eax
lea eax, [ebp - 4]
push eax
push esi
push str._r_necho_Starting_ConEmu..._r_nstart__ConEmu___
push ebx
call edi
test eax, eax
je 0x4b0a2d
cmp esi, dword [ebp - 4]
jne 0x4b0a2d
mov edx, dword [0x52fe2c]
push 0
push 0
push 0x1000
lea ecx, [ebp - 0x104c]
push ecx
push 0xffffffffffffffff
add edx, 0x1b4
push edx
push 0
push 1
call dword [sym.imp.KERNEL32.dll_WideCharToMultiByte]
test eax, eax
je 0x4b074c
lea ecx, [ebp - 0x104c]
push ecx
call dword [sym.imp.KERNEL32.dll_lstrlenA]
push 0
lea edx, [ebp - 4]
push edx
mov esi, eax
push esi
lea eax, [ebp - 0x104c]
push eax
push ebx
call edi
test eax, eax
je 0x4b0a2d
cmp esi, dword [ebp - 4]
jne 0x4b0a2d
push 0x505cd8
call dword [sym.imp.KERNEL32.dll_lstrlenA]
push 0
lea ecx, [ebp - 4]
push ecx
mov esi, eax
push esi
push 0x505cd8
push ebx
call edi
test eax, eax
je 0x4b0a2d
cmp esi, dword [ebp - 4]
jne 0x4b0a2d
mov edx, dword [ebp - 8]
cmp byte [edx + 0x4c], 0
je 0x4b07c6
push str._demote__cmd__
call dword [sym.imp.KERNEL32.dll_lstrlenA]
push 0
mov esi, eax
lea eax, [ebp - 4]
push eax
push esi
push str._demote__cmd__
push ebx
call edi
test eax, eax
je 0x4b0a2d
cmp esi, dword [ebp - 4]
jne 0x4b0a2d
mov edx, dword [0x52fe2c]
push 0
push 0
push 0x1000
lea ecx, [ebp - 0x104c]
push ecx
push 0xffffffffffffffff
add edx, 0x1b4
push edx
push 0
push 1
call dword [sym.imp.KERNEL32.dll_WideCharToMultiByte]
test eax, eax
jne 0x4b0768
mov eax, dword [0x52fe2c]
add eax, 0x1b4
push eax
call dword [sym.imp.KERNEL32.dll_lstrlenW]
push eax
push str.WideCharToMultiByte_failed__len_i
jmp 0x4b0a39
lea ecx, [ebp - 0x104c]
push ecx
call dword [sym.imp.KERNEL32.dll_lstrlenA]
push 0
lea edx, [ebp - 4]
push edx
mov esi, eax
push esi
lea eax, [ebp - 0x104c]
push eax
push ebx
call edi
test eax, eax
je 0x4b0a2d
cmp esi, dword [ebp - 4]
jne 0x4b0a2d
push 0x505cd8
call dword [sym.imp.KERNEL32.dll_lstrlenA]
push 0
lea ecx, [ebp - 4]
push ecx
mov esi, eax
push esi
push 0x505cd8
push ebx
call edi
test eax, eax
je 0x4b0a2d
cmp esi, dword [ebp - 4]
jne 0x4b0a2d
mov eax, dword [0x52fe2c]
cmp dword [eax + 0x2090], 0
je 0x4b084a
mov eax, dword [eax + 0x2090]
push 0
push 0
push 0x1000
lea edx, [ebp - 0x104c]
push edx
push 0xffffffffffffffff
push eax
push 0
push 1
call dword [sym.imp.KERNEL32.dll_WideCharToMultiByte]
test eax, eax
jne 0x4b0819
mov ecx, dword [0x52fe2c]
mov edx, dword [ecx + 0x2090]
push edx
call dword [sym.imp.KERNEL32.dll_lstrlenW]
push eax
push str.WideCharToMultiByte_failed__len_i
jmp 0x4b0a39
lea eax, [ebp - 0x104c]
push eax
call dword [sym.imp.KERNEL32.dll_lstrlenA]
push 0
lea ecx, [ebp - 4]
push ecx
mov esi, eax
push esi
lea edx, [ebp - 0x104c]
push edx
push ebx
call edi
test eax, eax
je 0x4b0a2d
cmp esi, dword [ebp - 4]
jne 0x4b0a2d
push str._r_ngoto_fin_r_n
call dword [sym.imp.KERNEL32.dll_lstrlenA]
push 0
mov esi, eax
lea eax, [ebp - 4]
push eax
push esi
push str._r_ngoto_fin_r_n
push ebx
call edi
test eax, eax
je 0x4b0a2d
cmp esi, dword [ebp - 4]
jne 0x4b0a2d
push str._r_n:err_r_n
call dword [sym.imp.KERNEL32.dll_lstrlenA]
push 0
lea ecx, [ebp - 4]
push ecx
mov esi, eax
push esi
push str._r_n:err_r_n
push ebx
call edi
test eax, eax
je 0x4b0a2d
cmp esi, dword [ebp - 4]
jne 0x4b0a2d
mov edx, dword [ebp - 8]
mov ecx, dword [edx + 0x28]
call fcn.004b2b00
cmp al, 1
mov eax, str.echo__aInstallation_failed_a
je 0x4b08bd
mov eax, str.echo__aExtraction_failed_a_r_n
push eax
call dword [sym.imp.KERNEL32.dll_lstrlenA]
mov esi, eax
mov eax, dword [ebp - 8]
mov ecx, dword [eax + 0x28]
call fcn.004b2b00
cmp al, 1
mov eax, str.echo__aInstallation_failed_a
je 0x4b08df
mov eax, str.echo__aExtraction_failed_a_r_n
push 0
lea ecx, [ebp - 4]
push ecx
push esi
push eax
push ebx
call edi
test eax, eax
je 0x4b0a2d
cmp esi, dword [ebp - 4]
jne 0x4b0a2d
push str._r_npause_r_n:fin_r_n
call dword [sym.imp.KERNEL32.dll_lstrlenA]
push 0
lea edx, [ebp - 4]
push edx
mov esi, eax
push esi
push str._r_npause_r_n:fin_r_n
push ebx
call edi
test eax, eax
je 0x4b0a2d
cmp esi, dword [ebp - 4]
jne 0x4b0a2d
mov eax, dword [ebp - 8]
mov ecx, dword [eax + 0x28]
cmp byte [ecx + 0x30], 0
jne 0x4b09e9
push str.del__
call dword [sym.imp.KERNEL32.dll_lstrlenA]
push 0
lea edx, [ebp - 4]
push edx
mov esi, eax
push esi
push str.del__
push ebx
call edi
test eax, eax
je 0x4b0a2d
cmp esi, dword [ebp - 4]
jne 0x4b0a2d
mov esi, dword [ebp + 8]
push 0
push 0
push 0x1000
lea eax, [ebp - 0x104c]
push eax
push 0xffffffffffffffff
push esi
push 0
push 1
call dword [sym.imp.KERNEL32.dll_WideCharToMultiByte]
test eax, eax
jne 0x4b099b
push esi
call dword [sym.imp.KERNEL32.dll_lstrlenW]
push eax
push str.WideCharToMultiByte_failed__len_i
jmp 0x4b0a39
lea ecx, [ebp - 0x104c]
push ecx
call dword [sym.imp.KERNEL32.dll_lstrlenA]
push 0
lea edx, [ebp - 4]
push edx
mov esi, eax
push esi
lea eax, [ebp - 0x104c]
push eax
push ebx
call edi
test eax, eax
je 0x4b0a2d
cmp esi, dword [ebp - 4]
jne 0x4b0a2d
push 0x505c58
call dword [sym.imp.KERNEL32.dll_lstrlenA]
push 0
lea ecx, [ebp - 4]
push ecx
mov esi, eax
push esi
push 0x505c58
push ebx
call edi
test eax, eax
je 0x4b0a2d
cmp esi, dword [ebp - 4]
jne 0x4b0a2d
push str.del___0___exit_r_n
call dword [sym.imp.KERNEL32.dll_lstrlenA]
push 0
lea edx, [ebp - 4]
push edx
mov esi, eax
push esi
push str.del___0___exit_r_n
push ebx
call edi
test eax, eax
je 0x4b0a2d
cmp esi, dword [ebp - 4]
jne 0x4b0a2d
mov dword [ebp - 0x24], 1
jmp 0x4b0a41
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov ecx, dword [ebp - 8]
push eax
push str.WriteBatch_failed__code_u
call fcn.004aec80
jmp 0x4b0a57
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.WriteBatch_failed__code_u
mov ecx, dword [ebp - 8]
call fcn.004aec80
mov eax, dword [ebp - 0x18]
test eax, eax
je 0x4b0a51
push eax
call fcn.0044c4f0
add esp, 4
cmp dword [ebp - 0x24], 0
jne 0x4b0a6a
mov eax, dword [ebp - 0x1c]
push eax
call fcn.0044c4f0
add esp, 4
mov dword [ebp - 0x1c], 0
pop ebx
mov eax, dword [ebp - 0xc]
test eax, eax
je 0x4b0a7e
cmp eax, 0xffffffff
je 0x4b0a7e
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, dword [ebp - 0x1c]
pop edi
pop esi
mov esp, ebp
pop ebp
ret 4