Function at 0x40d030
Capabilities:
Set file attributes

Disassembly:
push ebp
push ebx
push edi
push esi
sub esp, 0x1c
mov eax, dword [esp + 0x30]
mov edi, edx
mov dword [esp + 8], ecx
add edx, eax
test eax, eax
mov dword [esp], edx
je 0x40d054
movzx ebx, byte [edi]
test bl, bl
js 0x40d071
inc edi
jmp 0x40d0cb
xor esi, esi
mov ebx, 4
mov edx, 8
xor edi, edi
mov dword [esp + 4], 0
xor ebp, ebp
jmp 0x40d10f
movzx edx, byte [edi + 1]
mov eax, ebx
and eax, 0x1f
and edx, 0x3f
cmp bl, 0xdf
jbe 0x40d0be
movzx ecx, byte [edi + 2]
shl edx, 6
and ecx, 0x3f
or ecx, edx
cmp bl, 0xf0
jb 0x40d2c2
movzx ebx, byte [edi + 3]
and eax, 7
shl ecx, 6
add edi, 4
shl eax, 0x12
and ebx, 0x3f
or ebx, ecx
or ebx, eax
mov edx, dword [esp]
cmp ebx, 0xffff
jbe 0x40d0cb
jmp 0x40d2db
shl eax, 6
add edi, 2
or eax, edx
mov edx, dword [esp]
mov ebx, eax
mov ebp, ebx
mov eax, 1
xor esi, esi
mov ecx, edx
mov edx, 0xffffffff
mov ebx, 4
sub ecx, edi
add ecx, 3
cmovae edx, ecx
shr edx, 2
lea ecx, [edx + eax]
lea eax, [edx + eax + 1]
cmp ecx, 3
cmovae ebx, eax
cmp ebx, 0x40000000
jae 0x40d304
lea edx, [ebx + ebx]
mov ax, 1
mov dword [esp + 4], eax
movzx eax, byte [0x62314d]
xor ecx, ecx
call fcn.0048bb80
test eax, eax
je 0x40d304
mov word [eax], bp
mov dword [esp + 0xc], ebx
mov ebx, 1
mov dword [esp + 0x10], eax
mov dword [esp + 0x14], 1
jmp 0x40d159
xor ecx, ecx
mov edx, esi
cmp ebx, dword [esp + 0xc]
je 0x40d1ef
mov esi, ecx
mov word [eax + ebx*2], dx
inc ebx
mov dword [esp + 0x14], ebx
test edi, edi
je 0x40d180
test si, si
jne 0x40d140
cmp edi, dword [esp]
je 0x40d180
movzx edx, byte [edi]
test dl, dl
js 0x40d1aa
inc edi
xor ecx, ecx
jmp 0x40d144
cmp word [esp + 4], 1
mov edi, dword [esp + 0xc]
jne 0x40d27a
xor edx, edx
cmp ebx, edi
mov edi, 0
mov ebp, 0
mov dword [esp + 4], 0
jne 0x40d150
jmp 0x40d212
movzx esi, byte [edi + 1]
mov ecx, edx
and ecx, 0x1f
and esi, 0x3f
cmp dl, 0xdf
jbe 0x40d237
movzx ebp, byte [edi + 2]
shl esi, 6
and ebp, 0x3f
or ebp, esi
cmp dl, 0xf0
jb 0x40d248
movzx edx, byte [edi + 3]
and ecx, 7
shl ebp, 6
add edi, 4
shl ecx, 0x12
and edx, 0x3f
or edx, ebp
or edx, ecx
mov ecx, edx
cmp ecx, 0xffff
jbe 0x40d23f
jmp 0x40d25a
mov ebp, dword [esp]
mov eax, 0xffffffff
movzx esi, word [esp + 4]
sub ebp, edi
add ebp, 3
cmovb ebp, eax
shr ebp, 2
cmp cx, 1
sbb ebp, 0xffffffff
add ebp, esi
mov esi, ecx
mov dword [esp + 0x18], edx
mov edx, ebx
inc ebp
lea ecx, [esp + 0xc]
push 2
push 2
push ebp
call fcn.004df9e0
mov edx, dword [esp + 0x24]
add esp, 0xc
mov eax, dword [esp + 0x10]
jmp 0x40d150
shl ecx, 6
add edi, 2
or ecx, esi
mov edx, ecx
xor ecx, ecx
jmp 0x40d144
shl ecx, 0xc
add edi, 3
or ebp, ecx
mov ecx, ebp
cmp ecx, 0xffff
jbe 0x40d23f
lea edx, [ecx + 0xff0000]
and ecx, 0x3ff
shr edx, 0xa
or ecx, 0xdc00
or edx, 0xd800
jmp 0x40d144
mov esi, dword [esp + 0x10]
push 2
push esi
call sub.KERNEL32.dll_SetFileAttributesW
test eax, eax
je 0x40d2ac
mov eax, dword [esp + 8]
mov byte [eax], 4
test edi, edi
je 0x40d2a4
push esi
push 0
push dword [0x623140]
call dword [sym.imp.KERNEL32.dll_HeapFree]
add esp, 0x1c
pop esi
pop edi
pop ebx
pop ebp
ret
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov ecx, dword [esp + 8]
mov byte [ecx], 0
mov dword [ecx + 4], eax
test edi, edi
jne 0x40d295
jmp 0x40d2a4
shl eax, 0xc
add edi, 3
or ecx, eax
mov ebx, ecx
mov edx, dword [esp]
cmp ebx, 0xffff
jbe 0x40d0cb
lea ecx, [ebx + 0xff0000]
and ebx, 0x3ff
mov eax, 2
shr ecx, 0xa
or ebx, 0xdc00
or ecx, 0xd800
mov esi, ebx
mov ebp, ecx
jmp 0x40d0d4
ud2