Function at 0x402170
Capabilities:
Set file attributes

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xd38
push ebx
push esi
push edi
mov dword [ebp - 8], 0x4035b0
mov dword [ebp - 4], 0x4035d0
call fcn.00403690
mov dword [ebp - 0x10], 0x4035e0
mov dword [ebp - 0xc], 0x403600
lea edi, [ebp - 0x24]
push edi
call fcn.00403b90
push 0
lea edi, [ebp - 0x48]
push edi
call fcn.00403fa0
mov dword [ebp - 0x2c], 0
mov dword [ebp - 0x18], 0
mov dword [ebp - 0x14], 0
push dword [0x41e25c]
lea edi, [ebp - 0x1c]
push edi
call fcn.004038a0
test eax, eax
je 0x4021e5
mov dword [ebp - 0xd34], 0xb
jmp 0x40221d
cmp dword [0x41e254], 0
je 0x402200
mov edi, dword [0x41e254]
mov edi, dword [edi]
mov esi, edi
xor edi, edi
mov dword [ebp - 0x18], esi
mov dword [ebp - 0x14], edi
push 0
lea edi, [ebp - 0x18]
push edi
lea edi, [ebp - 0x1c]
push edi
call fcn.00403a10
test eax, eax
jne 0x4021d9
mov dword [ebp - 0xd34], 0
cmp dword [ebp - 0xd34], 0
jne 0x402260
push 0x40000
lea edi, [ebp - 8]
push edi
call dword [ebp - 8]
mov dword [ebp - 0x2c], eax
test eax, eax
je 0x402256
mov dword [ebp - 0x28], 0x40000
lea edi, [ebp - 0x24]
mov dword [ebp - 0x38], edi
mov dword [ebp - 0x30], 0
mov dword [ebp - 0x34], 0
jmp 0x402260
mov dword [ebp - 0xd34], 2
lea edi, [ebp - 0xc8]
push edi
call fcn.004041a0
cmp dword [ebp - 0xd34], 0
je 0x402292
cmp byte [0x41e24c], 0
jne 0x402825
push dword [ebp - 0xd34]
call fcn.00402030
jmp 0x402825
lea edi, [ebp - 0x10]
push edi
lea edi, [ebp - 8]
push edi
lea edi, [ebp - 0x48]
push edi
lea edi, [ebp - 0xc8]
push edi
call fcn.00406fb0
mov dword [ebp - 0xd34], eax
test eax, eax
jne 0x402275
or dword [ebp - 0xd04], 0xffffffff
mov dword [ebp - 0xd08], 0
mov dword [ebp - 0xd0c], 0
mov dword [0x41e268], 0
mov dword [0x41e26c], 0
mov dword [0x41e260], 0
mov dword [0x41e264], 0
cmp dword [ebp - 0x88], 0
jbe 0x40236e
xor edi, edi
mov esi, dword [ebp - 0x80]
mov ebx, edi
shr ebx, 3
movzx esi, byte [esi + ebx]
mov ebx, pe_nt_image_headers32
mov ecx, edi
and ecx, 7
sar ebx, cl
test esi, ebx
je 0x40232e
add dword [0x41e268], 1
adc dword [0x41e26c], 0
jmp 0x402365
mov esi, dword [ebp - 0x84]
lea ebx, [esi + edi*8 + 8]
mov ecx, dword [ebx]
mov ebx, dword [ebx + 4]
lea esi, [esi + edi*8]
sub ecx, dword [esi]
sbb ebx, dword [esi + 4]
mov eax, dword [0x41e268]
mov edx, dword [0x41e26c]
add eax, ecx
adc edx, ebx
add eax, 1
adc edx, 0
mov dword [0x41e268], eax
mov dword [0x41e26c], edx
inc edi
cmp edi, dword [ebp - 0x88]
jb 0x402302
mov dword [ebp - 0xd10], 0
mov dword [ebp - 0xd14], 0
cmp dword [ebp - 0x88], 0
ja 0x4025f3
mov esi, dword [ebp - 0xd34]
mov dword [ebp - 0xd28], esi
jmp 0x4027ff
mov dword [ebp - 0xd28], 0xb
jmp 0x4027ff
cmp byte [0x41e24c], 0
jne 0x402674
mov esi, dword [ebp - 0xd2c]
lea esi, [ebp + esi*2 - 0x6e4]
push esi
push edi
lea ebx, [ebp - 0xc8]
push ebx
call fcn.004071c0
cmp byte [0x41e270], 0
jne 0x4023e6
push esi
call fcn.00402090
lea ebx, [ebp - 0x10]
push ebx
lea ebx, [ebp - 8]
push ebx
lea ebx, [ebp - 0xd1c]
push ebx
lea ebx, [ebp - 0xd18]
push ebx
lea ebx, [ebp - 0xd0c]
push ebx
lea ebx, [ebp - 0xd08]
push ebx
lea ebx, [ebp - 0xd04]
push ebx
push edi
lea ebx, [ebp - 0x48]
push ebx
lea ebx, [ebp - 0xc8]
push ebx
call fcn.00406ff0
mov dword [ebp - 0xd34], eax
test eax, eax
jne 0x40238f
mov ebx, dword [ebp - 0x80]
mov ecx, edi
shr ecx, 3
movzx ebx, byte [ebx + ecx]
mov edx, pe_nt_image_headers32
mov ecx, edi
and ecx, 7
sar edx, cl
test ebx, edx
setne al
movzx ebx, al
mov dword [ebp - 0xd30], ebx
cmp word [esi], 0
je 0x40248e
xor ebx, ebx
cmp word [esi + ebx*2], 0x2f
jne 0x402486
mov word [esi + ebx*2], 0
cmp dword [0x41cfe0], 0
je 0x402480
lea ecx, [ebp - 0x6e4]
push ecx
call fcn.00414850
mov word [esi + ebx*2], 0x5c
inc ebx
cmp word [esi + ebx*2], 0
jne 0x40245e
cmp dword [ebp - 0xd30], 0
je 0x402560
cmp dword [0x41cfe0], 0
je 0x4024c8
lea esi, [ebp - 0x6e4]
push esi
call fcn.00414850
cmp byte [0x41cfdc], 0
je 0x4024c8
lea esi, [ebp - 0x6e4]
push esi
push 1
call dword [0x419304]
add dword [0x41e260], 1
adc dword [0x41e264], 0
call fcn.004020e0
jmp 0x40254e
mov esi, dword [ebp - 0xd1c]
inc esi
mov ecx, esi
xor ebx, ebx
add dword [0x41e260], ecx
adc dword [0x41e264], ebx
call fcn.004020e0
jmp 0x40254e
mov esi, dword [ebp - 0xd1c]
inc esi
mov ecx, esi
xor ebx, ebx
add dword [0x41e260], ecx
adc dword [0x41e264], ebx
call fcn.004020e0
jmp 0x40254e
cmp dword [ebp - 0x74], 0
je 0x40254e
mov esi, dword [ebp - 0x74]
mov ebx, edi
shr ebx, 3
movzx esi, byte [esi + ebx]
mov ebx, pe_nt_image_headers32
mov ecx, edi
and ecx, 7
sar ebx, cl
test esi, ebx
je 0x40254e
mov esi, dword [ebp - 0x70]
push dword [esi + edi*4]
lea esi, [ebp - 0x6e4]
push esi
call dword [sym.imp.KERNEL32.dll_SetFileAttributesW]
inc edi
cmp edi, dword [ebp - 0x88]
jb 0x4025f5
jmp 0x40238f
cmp dword [ebp - 0x6c], 0
je 0x402598
mov esi, dword [ebp - 0x6c]
mov ebx, edi
shr ebx, 3
movzx esi, byte [esi + ebx]
mov ebx, pe_nt_image_headers32
mov ecx, edi
and ecx, 7
sar ebx, cl
test esi, ebx
je 0x402598
mov esi, dword [ebp - 0x68]
mov ebx, dword [esi + edi*8 + 4]
mov dword [ebp - 0xd10], ebx
mov esi, dword [esi + edi*8]
mov dword [ebp - 0xd14], esi
lea esi, [ebp - 0xd14]
push esi
lea esi, [ebp - 0xd10]
push esi
mov esi, dword [ebp - 0xd1c]
mov ecx, esi
xor ebx, ebx
push ebx
push ecx
lea esi, [ebp - 0x6e4]
push esi
call dword [0x41e250]
cmp eax, 1
je 0x4025d4
xor esi, esi
cmp eax, 2
jne 0x4025d9
mov byte [0x41e24c], 1
jmp 0x4025d9
mov esi, 1
cmp byte [0x41e24c], 0
jne 0x402674
test esi, esi
je 0x402683
jmp 0x4024dd
xor edi, edi
mov dword [ebp - 0xd18], 0
mov dword [ebp - 0xd1c], 0
push 0
push edi
lea esi, [ebp - 0xc8]
push esi
call fcn.004071c0
mov dword [ebp - 0xd38], eax
lea esi, [ebp - 0x6e4]
mov ebx, dword [0x41e258]
xor ecx, ecx
mov ax, word [ebx + ecx]
mov word [esi + ecx], ax
add ecx, 2
test ax, ax
jne 0x40262c
lea esi, [ebp - 0x6e4]
push esi
call fcn.00414740
lea esi, [ebp - 0x6e4]
or ebx, 0xffffffff
inc ebx
cmp word [esi + ebx*2], 0
jne 0x402651
mov dword [ebp - 0xd2c], ebx
cmp dword [ebp - 0xd38], 0x104
jb 0x4023af
jmp 0x4023a0
mov dword [ebp - 0xd28], 2
jmp 0x4027ff
lea esi, [ebp - 0x6e4]
push esi
lea esi, [ebp - 0xd20]
push esi
call fcn.004038c0
test eax, eax
je 0x4026ff
push 0x61c
lea esi, [ebp - 0xd00]
push esi
push str.errorcreatefile
call dword [0x4192f0]
lea esi, [ebp - 0x6e4]
push esi
lea esi, [ebp - 0xd00]
push esi
call fcn.0040e040
add esp, 8
push 0x116
push 0x41cdb0
lea esi, [ebp - 0xd00]
push esi
push 0
call dword [sym.imp.USER32.dll_MessageBoxW]
cmp eax, 2
je 0x4026f5
cmp eax, 0xa
je 0x402683
cmp eax, 0xb
je 0x4024fb
jmp 0x4026ff
mov dword [ebp - 0xd34], 0xb
mov esi, dword [ebp - 0xd1c]
mov dword [ebp - 0xd24], esi
lea esi, [ebp - 0xd24]
push esi
mov esi, dword [ebp - 0xd08]
add esi, dword [ebp - 0xd18]
push esi
lea esi, [ebp - 0xd20]
push esi
call fcn.00403990
test eax, eax
jne 0x40273d
mov esi, dword [ebp - 0xd24]
cmp esi, dword [ebp - 0xd1c]
je 0x402780
push 0x61c
lea esi, [ebp - 0xd00]
push esi
push 0x415d2c
call dword [0x4192f0]
lea esi, [ebp - 0x6e4]
push esi
lea esi, [ebp - 0xd00]
push esi
call fcn.0040e040
add esp, 8
lea esi, [ebp - 0xd00]
push esi
call fcn.00414710
mov dword [ebp - 0xd34], 0xb
mov esi, dword [ebp - 0xd1c]
inc esi
mov ecx, esi
xor ebx, ebx
add dword [0x41e260], ecx
adc dword [0x41e264], ebx
call fcn.004020e0
cmp dword [ebp - 0x6c], 0
je 0x4027d8
mov esi, dword [ebp - 0x6c]
mov ebx, edi
shr ebx, 3
movzx esi, byte [esi + ebx]
mov ebx, pe_nt_image_headers32
mov ecx, edi
and ecx, 7
sar ebx, cl
test esi, ebx
je 0x4027d8
lea esi, [ebp - 0xd14]
push esi
lea esi, [ebp - 0xd10]
push esi
lea esi, [ebp - 0xd20]
push esi
call fcn.00403bf0
lea esi, [ebp - 0xd20]
push esi
call fcn.004038e0
cmp dword [ebp - 0xd34], 0
jne 0x40238f
test eax, eax
je 0x402519
mov dword [ebp - 0xd28], eax
mov edi, dword [ebp - 0xd28]
mov dword [ebp - 0xd34], edi
push dword [ebp - 0xd08]
lea edi, [ebp - 8]
push edi
call dword [ebp - 4]
cmp dword [ebp - 0xd34], 0
jne 0x402275
lea edi, [ebp - 8]
push edi
lea edi, [ebp - 0xc8]
push edi
call fcn.00404230
push dword [ebp - 0x2c]
lea edi, [ebp - 8]
push edi
call dword [ebp - 4]
lea edi, [ebp - 0x1c]
push edi
call fcn.004038e0
mov eax, dword [ebp - 0xd34]
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret