Function at 0x422c20
Capabilities:
Create directory
Delete file
Get common file path
Write file on windows

Disassembly:
sub esp, 0x248
push ebx
push ebp
mov ebp, ecx
xor ebx, ebx
push esi
push edi
cmp dword [ebp + 0x10], ebx
je 0x422c5f
mov eax, dword [ebp + 8]
xor esi, esi
cmp eax, ebx
jle 0x422c5f
cmp esi, eax
jge 0x422c4c
cmp esi, ebx
jl 0x422c4c
mov eax, dword [ebp + 4]
mov eax, dword [eax + esi*4]
jmp 0x422c4e
xor eax, eax
push eax
call fcn.004bd4c4
mov eax, dword [ebp + 8]
add esp, 4
inc esi
cmp esi, eax
jl 0x422c40
mov ecx, dword [ebp + 4]
push ecx
call fcn.004bd4c4
push 0x80
call fcn.004bd49b
mov dword [ebp + 4], eax
mov eax, dword [ebp + 0x128]
add esp, 8
cmp eax, 1
mov dword [ebp + 8], ebx
mov dword [ebp + 0xc], 0x1f
mov dword [ebp + 0x14], 0x40
mov dword [ebp + 0x1c], ebx
jne 0x422de7
mov edx, dword [ebp + 0x12c]
push edx
call dword [sym.imp.KERNEL32.dll_GlobalLock]
mov esi, eax
cmp esi, ebx
mov dword [esp + 0x20], esi
je 0x422de7
mov eax, dword [esi + 4]
add eax, esi
push eax
call fcn.004746d0
mov edi, eax
add esp, 4
cmp edi, ebx
mov dword [esp + 0x24], edi
je 0x422dda
mov eax, dword [esi]
cmp eax, ebx
jle 0x422dd4
lea ecx, [esi + 8]
mov dword [esp + 0x18], eax
mov dword [esp + 0x10], ecx
mov edx, dword [esp + 0x10]
push 0x8000
mov eax, dword [edx]
add eax, esi
push eax
push edi
call fcn.004744c0
mov ebx, eax
add esp, 0xc
test ebx, ebx
je 0x422dba
mov eax, dword [ebp + 0xc]
mov edx, dword [ebp + 8]
lea ecx, [eax + 1]
cmp edx, ecx
jne 0x422d6c
add eax, dword [ebp + 0x14]
lea edx, [eax*4 + 4]
push edx
call fcn.004bd49b
mov ecx, dword [ebp + 0xc]
mov esi, dword [ebp + 4]
mov edi, eax
mov dword [esp + 0x18], eax
lea ecx, [ecx*4 + 4]
mov edx, ecx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov eax, dword [ebp + 4]
push eax
call fcn.004bd4c4
mov edx, dword [ebp + 0x14]
mov eax, dword [ebp + 0xc]
mov ecx, dword [esp + 0x1c]
mov edi, dword [esp + 0x2c]
mov esi, dword [esp + 0x28]
add esp, 8
add eax, edx
mov dword [ebp + 4], ecx
mov dword [ebp + 0xc], eax
mov eax, dword [ebp + 8]
mov ecx, dword [ebp + 4]
mov dword [ecx + eax*4], ebx
mov edx, dword [ebp + 8]
inc edx
mov dword [ebp + 8], edx
lea edx, [esp + 0x1c]
push edx
push ebx
call fcn.004745d0
add esp, 8
test eax, eax
je 0x422dba
push eax
call fcn.00474360
mov eax, dword [esp + 0x20]
add esp, 4
test eax, 0x20000000
je 0x422da6
or dword [ebp + 0x1c], 1
test al, 1
jne 0x422dae
or dword [ebp + 0x1c], 2
test al, 2
jne 0x422dba
mov eax, dword [ebp + 0x1c]
or al, 4
mov dword [ebp + 0x1c], eax
mov ecx, dword [esp + 0x10]
mov eax, dword [esp + 0x18]
add ecx, 4
dec eax
mov dword [esp + 0x10], ecx
mov dword [esp + 0x18], eax
jne 0x422ce7
mov eax, dword [edi]
push edi
call dword [eax + 8]
mov ecx, dword [ebp + 0x12c]
push ecx
call dword [sym.imp.KERNEL32.dll_GlobalUnlock]
mov eax, dword [ebp + 8]
test eax, eax
je 0x422e00
pop edi
pop esi
pop ebp
mov eax, 1
pop ebx
add esp, 0x248
ret 4
cmp dword [ebp + 0x140], 1
jne 0x42307f
mov edx, dword [ebp + 0x144]
push edx
call dword [sym.imp.KERNEL32.dll_GlobalLock]
mov ebx, eax
test ebx, ebx
mov dword [esp + 0x20], ebx
je 0x42307f
mov esi, dword [ebp + 0x1c]
mov ecx, 0x40
or esi, 0x18
lea edi, [esp + 0x155]
mov dword [ebp + 0x1c], esi
mov al, byte [0x4f55a8]
mov byte [esp + 0x154], al
xor eax, eax
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
lea ecx, [esp + 0x154]
push ecx
push 0x104
stosb byte es:[edi], al
call dword [sym.imp.KERNEL32.dll_GetTempPathA]
lea esi, [ebp + 0x20]
lea edx, [esp + 0x154]
push esi
push 0
push str.ACD_DD
push edx
call dword [sym.imp.KERNEL32.dll_GetTempFileNameA]
push esi
call dword [sym.imp.KERNEL32.dll_DeleteFileA]
push 0
push esi
call dword [sym.imp.KERNEL32.dll_CreateDirectoryA]
mov eax, dword [ebx]
xor edi, edi
test eax, eax
mov dword [esp + 0x14], edi
jbe 0x42307f
lea eax, [ebx + 0x4c]
mov dword [esp + 0x18], eax
push str.FileContents
call dword [sym.imp.USER32.dll_RegisterClipboardFormatA]
lea edx, [esp + 0x28]
mov word [esp + 0x34], ax
mov eax, dword [ebp + 0x124]
mov esi, 4
push edx
lea edx, [esp + 0x38]
mov dword [esp + 0x3c], 0
mov dword [esp + 0x40], 1
mov dword [esp + 0x44], edi
mov dword [esp + 0x48], esi
mov ecx, dword [eax]
push edx
push eax
call dword [ecx + 0xc]
test eax, eax
jl 0x423062
cmp dword [esp + 0x28], esi
jne 0x423062
mov eax, dword [esp + 0x18]
lea ecx, [esp + 0x4c]
push eax
lea eax, [ebp + 0x20]
push eax
push ecx
call fcn.00471100
mov eax, dword [esp + 0x268]
add esp, 0xc
test eax, eax
je 0x422fce
mov edx, dword [esp + 0x2c]
push 0
push 0x80
push 2
push 0
push 0
lea eax, [esp + 0x60]
push 0x40000000
push eax
mov dword [esp + 0x40], edx
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov ebx, eax
cmp ebx, 0xffffffff
je 0x42304f
push 0x10000
call fcn.004bd49b
add esp, 4
mov esi, eax
mov eax, dword [esp + 0x24]
lea edx, [esp + 0x10]
push edx
push 0x10000
mov ecx, dword [eax]
xor edi, edi
push esi
push eax
mov dword [esp + 0x20], edi
call dword [ecx + 0xc]
test eax, eax
jne 0x422fb6
mov ecx, dword [esp + 0x10]
lea eax, [esp + 0x48]
push 0
push eax
push ecx
push esi
push ebx
call dword [sym.imp.KERNEL32.dll_WriteFile]
mov edi, eax
test edi, edi
je 0x422fb6
mov eax, dword [esp + 0x10]
test eax, eax
je 0x422fb6
mov eax, dword [esp + 0x24]
lea ecx, [esp + 0x10]
push ecx
push 0x10000
mov edx, dword [eax]
push esi
push eax
call dword [edx + 0xc]
test eax, eax
je 0x422f7b
push esi
call fcn.004bd4c4
add esp, 4
push ebx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
test edi, edi
je 0x42304f
lea edx, [esp + 0x4c]
push edx
call fcn.00470f80
mov ecx, eax
add esp, 4
test ecx, ecx
mov dword [esp + 0x1c], ecx
je 0x42304f
mov eax, dword [ebp + 0xc]
mov esi, dword [ebp + 8]
lea edx, [eax + 1]
cmp esi, edx
jne 0x42303f
add eax, dword [ebp + 0x14]
lea eax, [eax*4 + 4]
push eax
call fcn.004bd49b
mov ecx, dword [ebp + 0xc]
mov esi, dword [ebp + 4]
mov ebx, eax
lea ecx, [ecx*4 + 4]
mov edi, ebx
mov edx, ecx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov eax, dword [ebp + 4]
push eax
call fcn.004bd4c4
mov ecx, dword [ebp + 0x14]
mov eax, dword [ebp + 0xc]
add esp, 8
add eax, ecx
mov ecx, dword [esp + 0x1c]
mov dword [ebp + 4], ebx
mov dword [ebp + 0xc], eax
mov edx, dword [ebp + 8]
mov eax, dword [ebp + 4]
mov dword [eax + edx*4], ecx
mov eax, dword [ebp + 8]
inc eax
mov dword [ebp + 8], eax
lea ecx, [esp + 0x28]
push ecx
call dword [sym.imp.ole32.dll_ReleaseStgMedium]
mov ebx, dword [esp + 0x20]
mov edi, dword [esp + 0x14]
mov ecx, dword [esp + 0x18]
mov eax, dword [ebx]
inc edi
add ecx, 0x14c
cmp edi, eax
mov dword [esp + 0x14], edi
mov dword [esp + 0x18], ecx
jb 0x422ea3
mov eax, dword [ebp + 8]
test eax, eax
je 0x423098
pop edi
pop esi
pop ebp
mov eax, 1
pop ebx
add esp, 0x248
ret 4
cmp dword [ebp + 0x134], 1
jne 0x423182
mov edx, dword [ebp + 0x138]
push 0
push 0
push 0xffffffffffffffff
push edx
call dword [sym.imp.SHELL32.dll_DragQueryFileA]
mov edi, eax
xor esi, esi
test edi, edi
mov dword [esp + 0x20], edi
mov dword [esp + 0x14], esi
jle 0x423182
mov ecx, dword [ebp + 0x138]
lea eax, [esp + 0x4c]
push 0x104
push eax
push esi
push ecx
call dword [sym.imp.SHELL32.dll_DragQueryFileA]
test eax, eax
je 0x423175
lea edx, [esp + 0x4c]
push edx
call fcn.00470f80
mov ecx, eax
add esp, 4
test ecx, ecx
mov dword [esp + 0x1c], ecx
je 0x423175
mov eax, dword [ebp + 0xc]
mov ebx, dword [ebp + 8]
lea edx, [eax + 1]
cmp ebx, edx
jne 0x423165
add eax, dword [ebp + 0x14]
lea eax, [eax*4 + 4]
push eax
call fcn.004bd49b
mov ecx, dword [ebp + 0xc]
mov esi, dword [ebp + 4]
mov ebx, eax
lea ecx, [ecx*4 + 4]
mov edi, ebx
mov edx, ecx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov eax, dword [ebp + 4]
push eax
call fcn.004bd4c4
mov ecx, dword [ebp + 0x14]
mov eax, dword [ebp + 0xc]
mov esi, dword [esp + 0x1c]
mov edi, dword [esp + 0x28]
add esp, 8
add eax, ecx
mov ecx, dword [esp + 0x1c]
mov dword [ebp + 4], ebx
mov dword [ebp + 0xc], eax
mov edx, dword [ebp + 8]
mov eax, dword [ebp + 4]
mov dword [eax + edx*4], ecx
mov eax, dword [ebp + 8]
inc eax
mov dword [ebp + 8], eax
inc esi
cmp esi, edi
mov dword [esp + 0x14], esi
jl 0x4230cc
mov ecx, dword [ebp + 8]
xor eax, eax
pop edi
pop esi
test ecx, ecx
pop ebp
pop ebx
setne al
add esp, 0x248
ret 4