Function at 0x402830
Capabilities:
Delete file

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
push 0xffffffffffffffff
push 0x437691
mov eax, dword fs:[0]
push eax
sub esp, 0x30
push ebx
push esi
push edi
mov eax, dword [0x44765c]
xor eax, esp
push eax
lea eax, [esp + 0x40]
mov dword fs:[0], eax
xor edi, edi
mov esi, 1
lea ecx, [esp + 0x24]
mov dword [esp + 0x14], edi
mov dword [esp + 0x18], esi
call fcn.004059aa
mov dword [esp + 0x48], edi
call fcn.004053eb
xor ecx, ecx
cmp eax, edi
setne cl
cmp ecx, edi
jne 0x402892
push 0x80004005
call fcn.00403e10
mov edx, dword [eax]
mov ecx, eax
mov eax, dword [edx + 0xc]
call eax
add eax, 0x10
mov dword [esp + 0x10], eax
mov ecx, dword [ebp + 8]
push ecx
lea edx, [esp + 0x14]
push 0x43dd6c
push edx
mov byte [esp + 0x54], 1
call fcn.00403ee0
add esp, 0xc
push esi
lea eax, [esp + 0x24]
push eax
lea ecx, [esp + 0x18]
call fcn.00403040
mov byte [esp + 0x48], 2
mov eax, dword [eax]
mov dword [esp + 0x14], esi
mov ecx, 0x43e0d8
lea esp, [esp]
mov dx, word [eax]
cmp dx, word [ecx]
jne 0x402906
cmp dx, di
je 0x402902
mov dx, word [eax + 2]
cmp dx, word [ecx + 2]
jne 0x402906
add eax, 4
add ecx, 4
cmp dx, di
jne 0x4028e0
xor eax, eax
jmp 0x40290b
sbb eax, eax
sbb eax, 0xffffffff
cmp eax, edi
setne al
test al, al
je 0x40296a
push esi
lea ecx, [esp + 0x20]
push ecx
lea ecx, [esp + 0x18]
call fcn.00403040
mov eax, dword [eax]
mov dword [esp + 0x14], 3
mov ecx, 0x43e168
mov dx, word [eax]
cmp dx, word [ecx]
jne 0x402958
cmp dx, di
je 0x402954
mov dx, word [eax + 2]
cmp dx, word [ecx + 2]
jne 0x402958
add eax, 4
add ecx, 4
cmp dx, di
jne 0x402932
xor eax, eax
jmp 0x40295d
sbb eax, eax
sbb eax, 0xffffffff
cmp eax, edi
setne al
test al, al
je 0x40296a
mov bl, 1
jmp 0x40296c
xor bl, bl
test byte [esp + 0x14], 2
je 0x402998
mov eax, dword [esp + 0x1c]
and dword [esp + 0x14], 0xfffffffd
add eax, 0xfffffff0
lea edx, [eax + 0xc]
or ecx, 0xffffffff
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jg 0x402998
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov dword [esp + 0x48], esi
test byte [esp + 0x14], 1
je 0x4029c3
mov eax, dword [esp + 0x20]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x4029c3
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
test bl, bl
je 0x4029d6
push esi
push 0x43e0d8
lea ecx, [esp + 0x18]
call fcn.00403590
push 3
push 0x43e0ec
lea ecx, [esp + 0x18]
call fcn.00403590
mov esi, dword [esp + 0x10]
push edi
push esi
lea ecx, [esp + 0x2c]
call fcn.00405a42
cmp eax, edi
je 0x402af8
mov ebx, dword [sym.imp.KERNEL32.dll_DeleteFileW]
lea ecx, [esp + 0x24]
call fcn.0040568c
lea ecx, [esp + 0x24]
mov edi, eax
call fcn.0040596b
test eax, eax
jne 0x402a6a
mov edx, dword [esp + 0x24]
mov eax, dword [edx + 0x38]
push 0x10
lea ecx, [esp + 0x28]
call eax
test eax, eax
jne 0x402a6a
lea ecx, [esp + 0x20]
push ecx
lea ecx, [esp + 0x28]
call fcn.00405cb3
mov eax, dword [eax]
push eax
call ebx
mov eax, dword [esp + 0x20]
add eax, 0xfffffff0
lea edx, [eax + 0xc]
or ecx, 0xffffffff
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jg 0x402af0
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
jmp 0x402af0
lea ecx, [esp + 0x24]
call fcn.0040596b
test eax, eax
jne 0x402af0
mov edx, dword [esp + 0x24]
mov eax, dword [edx + 0x38]
push 0x10
lea ecx, [esp + 0x28]
call eax
test eax, eax
je 0x402af0
lea ecx, [esp + 0x1c]
push ecx
lea ecx, [esp + 0x28]
call fcn.00405cb3
push eax
lea ecx, [esp + 0x14]
mov byte [esp + 0x4c], 3
call fcn.00403c00
mov byte [esp + 0x48], 1
mov eax, dword [esp + 0x1c]
add eax, 0xfffffff0
lea edx, [eax + 0xc]
or ecx, 0xffffffff
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jg 0x402acc
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov esi, dword [esp + 0x10]
push esi
call fcn.00402830
add esp, 4
test eax, eax
jne 0x402ae1
mov dword [esp + 0x18], eax
push esi
call dword [sym.imp.KERNEL32.dll_RemoveDirectoryW]
test eax, eax
jne 0x402af0
mov dword [esp + 0x18], eax
test edi, edi
jne 0x402a03
lea eax, [esi - 0x10]
mov byte [esp + 0x48], 0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x402b19
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
lea ecx, [esp + 0x24]
mov dword [esp + 0x48], 0xffffffff
call fcn.004059d3
mov eax, dword [esp + 0x18]
mov ecx, dword [esp + 0x40]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret