Function at 0x402520
Capabilities:
Access peb ldr_data
Get common file path
Read .ini file

Disassembly:
mov eax, dword fs:[0]
push 0xffffffffffffffff
push 0x447b09
push eax
mov eax, 0x87ac
mov dword fs:[0], esp
call fcn.0042dd50
push esi
push edi
mov esi, ecx
lea ecx, [esp + 0x14]
mov dword [esp + 0x87bc], 0
call fcn.0043be4f
xor eax, eax
mov ecx, 0x100
lea edi, [esp + 0x134]
rep stosd dword es:[edi], eax
mov ecx, 0x41
lea edi, [esp + 0x30]
rep stosd dword es:[edi], eax
push 0x104
lea eax, [esp + 0x34]
push eax
mov byte [esp + 0x87c4], 1
call dword [sym.imp.KERNEL32.dll_GetWindowsDirectoryA]
lea ecx, [esi + 0x18]
mov dword [esp + 0xc], ecx
call fcn.00401360
lea ecx, [esi + 0x1c]
mov dword [esp + 8], ecx
call fcn.00401360
lea ecx, [esp + 0x30]
push ecx
call dword [sym.imp.KERNEL32.dll_lstrlenA]
mov edi, dword [sym.imp.KERNEL32.dll_lstrcatA]
lea edx, [esp + 0x30]
mov cl, byte [eax + edx - 1]
dec edx
cmp cl, 0x5c
je 0x4025cd
push 0x44b63c
lea eax, [esp + 0x34]
push eax
call edi
mov eax, dword [esi + 0x14]
mov ecx, dword [eax - 0xc]
add esi, 0x14
test ecx, ecx
mov dword [esp + 0x2c], esi
jne 0x402679
push str.UninstSi.ini
lea ecx, [esp + 0x34]
push ecx
call edi
lea edx, [esp + 0x534]
push edx
lea eax, [esp + 0x34]
push eax
call dword [sym.imp.KERNEL32.dll_FindFirstFileA]
cmp eax, 0xffffffff
jne 0x402653
mov ecx, esi
call fcn.00401360
lea ecx, [esp + 0x14]
mov byte [esp + 0x87bc], 0
call fcn.0043bea1
mov eax, dword [esp + 0x87c4]
add eax, 0xfffffff0
mov dword [esp + 0x87bc], 0xffffffff
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x402946
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
call dword [edx + 4]
jmp 0x402946
push eax
call dword [sym.imp.KERNEL32.dll_FindClose]
lea eax, [esp + 0x30]
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x402661
sub eax, edx
push eax
lea eax, [esp + 0x34]
push eax
mov ecx, esi
call fcn.00401a70
jmp 0x4026e1
lea ecx, [esp + 0x674]
push ecx
push eax
call dword [sym.imp.KERNEL32.dll_FindFirstFileA]
cmp eax, 0xffffffff
jne 0x4026da
mov ecx, esi
call fcn.00401360
lea ecx, [esp + 0x14]
mov byte [esp + 0x87bc], 0
call fcn.0043bea1
mov eax, dword [esp + 0x87c4]
add eax, 0xfffffff0
mov dword [esp + 0x87bc], 0xffffffff
lea edx, [eax + 0xc]
or ecx, 0xffffffff
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jg 0x402946
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
call dword [edx + 4]
jmp 0x402946
push eax
call dword [sym.imp.KERNEL32.dll_FindClose]
xor eax, eax
mov ecx, 0x1fff
lea edi, [esp + 0x7b4]
rep stosd dword es:[edi], eax
push ebx
mov ebx, dword [sym.imp.KERNEL32.dll_GetPrivateProfileStringA]
stosw word es:[edi], ax
push ebp
mov ebp, dword [esp + 0x87cc]
stosb byte es:[edi], al
mov eax, dword [esi]
push eax
push 0x7fff
lea eax, [esp + 0x7c4]
push eax
push 0x44b62a
push 0
push ebp
call ebx
test eax, eax
ja 0x402738
mov ecx, dword [esp + 0x14]
call fcn.00401360
mov ecx, dword [esp + 0x10]
call fcn.00401360
jmp 0x40290e
call fcn.0043cb83
mov edx, dword [eax]
mov ecx, eax
call dword [edx + 0xc]
lea edi, [eax + 0x10]
mov dword [esp + 0x18], edi
mov byte [esp + 0x87c4], 2
lea eax, [esp + 0x7bc]
lea ebx, [ebx]
cmp byte [eax], 0
jne 0x40276f
mov cl, byte [eax + 1]
test cl, cl
je 0x402772
mov byte [eax], 9
inc eax
jmp 0x402760
lea eax, [esp + 0x7bc]
push 0x44b628
push eax
call fcn.0042e8d8
add esp, 8
test eax, eax
je 0x4027ef
mov bl, 3
lea ecx, [ecx]
push eax
lea ecx, [esp + 0x34]
call fcn.00402470
mov ecx, dword [esp + 0x24]
push eax
push ecx
lea ecx, [esp + 0x24]
mov byte [esp + 0x87cc], bl
call fcn.0043c0dd
mov eax, dword [esp + 0x30]
add eax, 0xfffffff0
mov byte [esp + 0x87c4], 2
lea edx, [eax + 0xc]
or ecx, 0xffffffff
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jg 0x4027d6
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
call dword [edx + 4]
push 0x44b628
push 0
call fcn.0042e8d8
add esp, 8
test eax, eax
jne 0x402790
mov ebx, dword [sym.imp.KERNEL32.dll_GetPrivateProfileStringA]
mov eax, dword [esp + 0x24]
xor esi, esi
test eax, eax
jle 0x4028ec
lea ecx, [ecx]
test esi, esi
mov ecx, dword [esp + 0x34]
mov ecx, dword [ecx]
jl 0x402969
cmp esi, eax
jge 0x402969
mov edx, dword [esp + 0x20]
mov eax, dword [edx + esi*4]
push ecx
push 0x400
lea ecx, [esp + 0x144]
push ecx
push 0x44b62a
push eax
push ebp
call ebx
lea eax, [esp + 0x13c]
lea ecx, [eax + 1]
mov edi, edi
mov dl, byte [eax]
inc eax
test dl, dl
jne 0x402840
sub eax, ecx
push eax
lea edx, [esp + 0x140]
push edx
lea ecx, [esp + 0x20]
call fcn.00401a70
mov edi, dword [esp + 0x18]
mov eax, dword [edi - 0xc]
cmp eax, 1
jl 0x4028df
test eax, eax
jl 0x40295f
cmp byte [edi], 0x3b
je 0x4028df
push str.Delete_Printer_Name
push ebp
call fcn.0042de57
add esp, 8
test eax, eax
jne 0x4028b1
lea eax, [esp + 0x13c]
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x402890
mov ecx, dword [esp + 0x14]
sub eax, edx
push eax
lea eax, [esp + 0x140]
push eax
call fcn.00401b10
mov ecx, dword [esp + 0x14]
jmp 0x4028d8
push str.Delete_Driver_Name
push ebp
call fcn.0042de57
add esp, 8
test eax, eax
jne 0x4028df
lea ecx, [esp + 0x13c]
push ecx
mov ecx, dword [esp + 0x14]
call fcn.00402300
mov ecx, dword [esp + 0x10]
push 9
call fcn.00401a10
mov eax, dword [esp + 0x24]
inc esi
cmp esi, eax
jl 0x402800
lea eax, [edi - 0x10]
mov byte [esp + 0x87c4], 1
lea edx, [eax + 0xc]
or ecx, 0xffffffff
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jg 0x40290e
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
call dword [edx + 4]
lea ecx, [esp + 0x1c]
mov byte [esp + 0x87c4], 0
call fcn.0043bea1
lea eax, [ebp - 0x10]
mov dword [esp + 0x87c4], 0xffffffff
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x402944
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
call dword [edx + 4]
pop ebp
pop ebx
mov ecx, dword [esp + 0x87b4]
pop edi
pop esi
mov dword fs:[0], ecx
add esp, 0x87b8
ret 4
push 0x80070057
call fcn.004010c0
call fcn.0043b946
int3