Function at 0x402930
Capabilities:
Delete file

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x428abf
mov eax, dword fs:[0]
push eax
sub esp, 0x190
mov eax, dword [0x433018]
xor eax, ebp
mov dword [ebp - 0x14], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov dword [ebp - 0x10], esp
xor edi, edi
mov dword [ebp - 4], edi
xor eax, eax
mov word [ebp - 0xf8], ax
push 0xa
mov eax, str.es2devedit
lea esi, [ebp - 0xf8]
mov ebx, ecx
mov dword [ebp - 0x150], edi
mov dword [ebp - 0xe4], 7
mov dword [ebp - 0xe8], edi
call fcn.00401b40
mov ecx, esi
push ecx
lea ecx, [ebp - 0x14c]
mov byte [ebp - 4], 1
call fcn.00402580
mov byte [ebp - 4], 3
cmp dword [ebp - 0xe4], 8
jb 0x4029c8
mov edx, dword [ebp - 0xf8]
push edx
call dword [sym.imp.MSVCR100.dll_void___cdecl_operator_delete_void__]
add esp, 4
xor eax, eax
mov dword [ebp - 0xe4], 7
mov dword [ebp - 0xe8], edi
mov word [ebp - 0xf8], ax
cmp dword [ebp - 0x13c], edi
je 0x402a0d
push 1
mov eax, 0x42953c
lea ecx, [ebp - 0x14c]
call fcn.00401a10
push 0xa
mov eax, str.Connection
lea ecx, [ebp - 0x14c]
call fcn.00401a10
xor ecx, ecx
push 0x12
mov eax, str.EPSONEpson_Scan_2
lea esi, [ebp - 0x130]
mov dword [ebp - 0x11c], 7
mov dword [ebp - 0x120], edi
mov word [ebp - 0x130], cx
call fcn.00401b40
push 1
mov eax, 0x42953c
mov ecx, esi
mov byte [ebp - 4], 4
call fcn.00401a10
push 0xa
mov eax, str.Connection
mov ecx, esi
call fcn.00401a10
lea edx, [ebp - 0x14e]
push edx
lea eax, [ebp - 0x184]
push eax
call fcn.004031d0
mov byte [ebp - 4], 5
xor ecx, ecx
mov eax, ebx
mov dword [ebp - 0x100], 7
mov dword [ebp - 0x104], edi
mov word [ebp - 0x114], cx
lea edx, [eax + 2]
lea ecx, [ecx]
mov cx, word [eax]
add eax, 2
cmp cx, di
jne 0x402a90
sub eax, edx
sar eax, 1
push eax
mov eax, ebx
lea esi, [ebp - 0x114]
call fcn.00401b40
lea ecx, [ebp - 0x184]
mov edx, esi
mov byte [ebp - 4], 6
call fcn.00405f80
mov byte [ebp - 4], 5
cmp dword [ebp - 0x100], 8
jb 0x402adb
mov edx, dword [ebp - 0x114]
push edx
call dword [sym.imp.MSVCR100.dll_void___cdecl_operator_delete_void__]
add esp, 4
lea eax, [ebp - 0x184]
push eax
mov ecx, 0x435da0
call fcn.0041bc10
xor ecx, ecx
push 0xa
mov eax, str.DeviceList
lea esi, [ebp - 0x114]
mov dword [ebp - 0x100], 7
mov dword [ebp - 0x104], edi
mov word [ebp - 0x114], cx
call fcn.00401b40
lea edx, [ebp - 0x114]
push edx
lea eax, [ebp - 0x154]
push eax
mov byte [ebp - 4], 7
mov esi, dword [ebp - 0x180]
lea eax, [ebp - 0x184]
call fcn.004032c0
cmp dword [ebp - 0x154], esi
mov byte [ebp - 4], 5
setne bl
cmp dword [ebp - 0x100], 8
jb 0x402b60
mov ecx, dword [ebp - 0x114]
push ecx
call dword [sym.imp.MSVCR100.dll_void___cdecl_operator_delete_void__]
add esp, 4
test bl, bl
je 0x402e27
xor edx, edx
mov edi, 7
xor ebx, ebx
push 0xa
mov eax, str.DeviceList
lea esi, [ebp - 0xf8]
mov dword [ebp - 0xe4], edi
mov dword [ebp - 0xe8], ebx
mov word [ebp - 0xf8], dx
call fcn.00401b40
mov ecx, esi
lea esi, [ebp - 0x184]
mov byte [ebp - 4], 8
call fcn.00403000
mov ecx, dword [eax]
cmp ecx, ebx
je 0x402bbc
mov eax, dword [ecx]
mov edx, dword [eax + 8]
call edx
mov dword [ebp - 0x154], eax
jmp 0x402bc2
mov dword [ebp - 0x154], ebx
mov byte [ebp - 4], 0xa
cmp dword [ebp - 0xe4], 8
jb 0x402bdf
mov eax, dword [ebp - 0xf8]
push eax
call dword [sym.imp.MSVCR100.dll_void___cdecl_operator_delete_void__]
add esp, 4
xor ecx, ecx
mov dword [ebp - 0xe8], ebx
mov word [ebp - 0xf8], cx
lea ecx, [ebp - 0x154]
lea ebx, [ebp - 0x19c]
mov dword [ebp - 0xe4], edi
call fcn.00403ba0
xor esi, esi
mov byte [ebp - 4], 0xb
push 0x24
cmp dword [ebp - 0x13c], esi
je 0x402c5e
call dword [sym.imp.MSVCR100.dll_void____cdecl_operator_new_unsigned_int_]
add esp, 4
mov dword [ebp - 0x158], eax
mov byte [ebp - 4], 0xc
cmp eax, esi
je 0x402c52
cmp dword [ebp - 0x138], 8
mov ecx, dword [ebp - 0x14c]
jae 0x402c41
lea ecx, [ebp - 0x14c]
push ecx
push eax
call fcn.004011e0
mov edi, eax
mov dword [ebp - 0x150], edi
jmp 0x402c9f
xor eax, eax
mov edi, eax
mov dword [ebp - 0x150], edi
jmp 0x402c9f
call dword [sym.imp.MSVCR100.dll_void____cdecl_operator_new_unsigned_int_]
add esp, 4
mov dword [ebp - 0x158], eax
mov byte [ebp - 4], 0xd
cmp eax, esi
je 0x402c93
cmp dword [ebp - 0x11c], 8
mov ebx, dword [ebp - 0x130]
jae 0x402c8a
lea ebx, [ebp - 0x130]
mov ecx, eax
call fcn.00401040
jmp 0x402c95
xor eax, eax
mov dword [ebp - 0x150], eax
mov edi, eax
xor esi, esi
mov dword [ebp - 0xec], esi
mov dword [ebp - 0xe8], esi
mov dword [ebp - 0xe4], esi
xor edx, edx
mov dword [ebp - 0x100], 7
mov dword [ebp - 0x104], esi
mov word [ebp - 0x114], dx
push 0xb
mov eax, str.ConnectInfo
lea esi, [ebp - 0x114]
mov byte [ebp - 4], 0xf
call fcn.00401b40
push 4
mov eax, str..dat
mov ecx, esi
call fcn.00401a10
cmp dword [ebp - 0x100], 8
mov ecx, dword [ebp - 0x114]
jae 0x402cff
mov ecx, esi
push edi
lea edx, [ebp - 0xec]
call fcn.00401480
mov esi, dword [ebp - 0xec]
mov ebx, dword [sym.imp.KERNEL32.dll_DeleteFileW]
cmp esi, dword [ebp - 0xe8]
je 0x402d39
cmp dword [esi + 0x14], 8
jb 0x402d2f
mov eax, dword [esi]
push eax
call ebx
add esi, 0x1c
jmp 0x402d17
mov eax, esi
push eax
call ebx
add esi, 0x1c
jmp 0x402d17
push str..dat
push str.ConnectInfo
push str._s_s
lea eax, [ebp - 0xdc]
push 0x64
push eax
call dword [sym.imp.MSVCR100.dll_swprintf_s]
add esp, 0x14
push edi
lea ecx, [ebp - 0x184]
lea edx, [ebp - 0xdc]
call fcn.00401260
cmp dword [ebp - 0x100], 8
mov ebx, dword [sym.imp.MSVCR100.dll_void___cdecl_operator_delete_void__]
jb 0x402d87
mov ecx, dword [ebp - 0x114]
push ecx
call ebx
add esp, 4
xor edx, edx
mov byte [ebp - 4], 0xb
mov dword [ebp - 0x100], 7
mov dword [ebp - 0x104], 0
mov word [ebp - 0x114], dx
cmp dword [ebp - 0xec], edx
je 0x402dec
mov edi, dword [ebp - 0xec]
mov esi, edi
cmp esi, dword [ebp - 0xe8]
je 0x402de6
cmp dword [esi + 0x14], 8
jb 0x402dce
mov eax, dword [esi]
push eax
call ebx
add esp, 4
xor ecx, ecx
mov dword [esi + 0x14], 7
mov dword [esi + 0x10], 0
mov word [esi], cx
add esi, 0x1c
jmp 0x402db8
push edi
call ebx
add esp, 4
lea esi, [ebp - 0x19c]
mov byte [ebp - 4], 0x10
call fcn.00403540
mov edx, dword [ebp - 0x19c]
push edx
call ebx
mov byte [ebp - 4], 5
mov ecx, dword [ebp - 0x154]
add esp, 4
mov dword [ebp - 0x19c], 0
test ecx, ecx
je 0x402e27
mov eax, dword [ecx]
mov edx, dword [eax]
push 1
call edx
mov eax, dword [ebp - 0x174]
mov esi, dword [sym.imp.MSVCR100.dll_void___cdecl_operator_delete_void__]
xor edi, edi
cmp eax, edi
je 0x402e3f
push eax
call esi
add esp, 4
lea eax, [ebp - 0x180]
mov dword [ebp - 0x174], edi
mov dword [ebp - 0x170], edi
mov dword [ebp - 0x16c], edi
mov dword [ebp - 0x158], eax
mov ecx, eax
push ecx
mov byte [ebp - 4], 0x11
call fcn.00403490
mov edx, dword [ebp - 0x180]
push edx
call esi
mov ebx, 8
add esp, 4
cmp dword [ebp - 0x11c], ebx
jb 0x402e8e
mov eax, dword [ebp - 0x130]
push eax
call esi
add esp, 4
xor ecx, ecx
mov esi, 7
mov dword [ebp - 0x11c], esi
mov dword [ebp - 0x120], edi
mov word [ebp - 0x130], cx
cmp dword [ebp - 0x138], ebx
jb 0x402ec0
mov edx, dword [ebp - 0x14c]
push edx
call dword [sym.imp.MSVCR100.dll_void___cdecl_operator_delete_void__]
add esp, 4
xor eax, eax
mov dword [ebp - 0x138], esi
mov dword [ebp - 0x13c], edi
mov word [ebp - 0x14c], ax
mov dword [ebp - 4], 0xffffffff
mov ecx, dword [ebp - 0x150]
test ecx, ecx
je 0x402eee
mov edx, dword [ecx]
mov eax, dword [edx]
push 1
call eax
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x14]
xor ecx, ebp
call fcn.0042543a
mov esp, ebp
pop ebp
ret