Function at 0x40531a
Capabilities:
Copy file
Identify system language via api
Read file on windows
Set file attributes

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x694
mov eax, dword [0x40e004]
xor eax, esp
mov dword [esp + 0x690], eax
push ebx
push esi
push edi
mov ebx, ecx
lea edx, [esp + 0x298]
mov edi, 0x200
mov dword [esp + 0xc], ebx
push edi
mov ecx, 0x41e
call fcn.00402774
lea eax, [esp + 0x298]
mov ecx, ebx
push eax
call fcn.00405c5f
push 0x410c60
push edi
lea eax, [esp + 0x2a0]
mov esi, 0x4016fc
push eax
push esi
mov edx, 0x40170c
mov ecx, 0x401064
call fcn.00402ad1
test eax, eax
jne 0x40539b
push esi
mov edx, edi
lea ecx, [esp + 0x29c]
call fcn.00401a45
push ecx
lea edx, [esp + 0x194]
lea ecx, [esp + 0x29c]
call fcn.004060f3
xor esi, esi
test eax, eax
push esi
lea eax, [esp + 0x194]
jne 0x4053d2
push 0x10
push esi
push eax
mov edx, 0x46d
mov ecx, ebx
call fcn.00402462
jmp 0x4055dd
mov edi, 0x40f32c
push edi
push eax
call dword [sym.imp.KERNEL32.dll_CopyFileA]
test eax, eax
jne 0x405418
call dword [sym.imp.KERNEL32.dll_GetLastError]
push esi
push 0x200
lea ecx, [esp + 0x4a0]
push ecx
push esi
push eax
push esi
push 0x1000
call dword [sym.imp.KERNEL32.dll_FormatMessageA]
push esi
push 0x10
lea eax, [esp + 0x4a0]
mov edx, 0x45b
push eax
push edi
jmp 0x4053c6
push 0x80
push edi
call dword [sym.imp.KERNEL32.dll_SetFileAttributesA]
lea ecx, [esp + 0x190]
call fcn.0040634d
mov ebx, eax
mov dword [esp + 0x20], ebx
test ebx, ebx
jne 0x405454
mov ecx, dword [esp + 0xc]
lea eax, [esp + 0x190]
push esi
push 0x10
push esi
push eax
mov edx, 0x45c
jmp 0x4053c8
call dword [sym.imp.KERNEL32.dll_GetUserDefaultUILanguage]
mov ecx, 0x40efa8
movzx edi, ax
mov dword [esp + 0x18], edi
lea edx, [ecx + 1]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x405469
sub ecx, edx
lea eax, [ecx + 1]
mov ecx, ebx
push eax
push 0x40efa8
push edi
push 0x40171c
push 0xa
pop edx
call fcn.00406479
test eax, eax
je 0x4055bd
cmp dword [0x40ee94], esi
je 0x4054b7
mov ecx, 0x40f028
lea edx, [ecx + 1]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x4054a3
sub ecx, edx
lea eax, [ecx + 1]
push eax
push 0x40f028
jmp 0x4054be
push 7
push 0x40172c
push edi
push 0x401724
push 0xa
pop edx
mov ecx, ebx
call fcn.00406479
test eax, eax
je 0x4055bd
cmp dword [0x40ee98], esi
je 0x4055ff
lea eax, [esp + 0x28]
push eax
push 0x40f228
call dword [sym.imp.KERNEL32.dll_FindFirstFileA]
mov edi, dword [esp + 0x48]
sub edi, dword [esp + 0x44]
push eax
mov dword [esp + 0x20], edi
call dword [sym.imp.KERNEL32.dll_FindClose]
push esi
push esi
push 3
push esi
push esi
push 0x80000000
push 0x40f228
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov dword [esp + 0x14], eax
cmp eax, 0xffffffff
jne 0x40553b
mov edx, 0x468
push esi
push 0x10
push esi
push 0x40f228
mov ecx, dword [esp + 0x1c]
jmp 0x4055cd
lea eax, [edi + 1]
mov dword [esp + 0x10], eax
cmp eax, edi
jb 0x4055f4
push eax
push 0x40
call dword [sym.imp.KERNEL32.dll_LocalAlloc]
mov edi, eax
push esi
test edi, edi
jne 0x405565
mov ecx, dword [esp + 0x10]
mov edx, 0x44c
jmp 0x4055c9
lea eax, [esp + 0x28]
push eax
push dword [esp + 0x24]
push edi
push dword [esp + 0x24]
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
jne 0x405584
mov edx, 0x469
jmp 0x405529
push dword [esp + 0x14]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push dword [esp + 0x10]
mov ecx, ebx
push edi
push dword [esp + 0x20]
push 0x401734
push 0xa
pop edx
call fcn.00406479
push edi
test eax, eax
je 0x4055b7
call dword [sym.imp.KERNEL32.dll_LocalFree]
mov edi, dword [esp + 0x18]
jmp 0x40561a
call dword [sym.imp.KERNEL32.dll_LocalFree]
mov edi, dword [esp + 0xc]
mov edx, 0x45d
mov ecx, edi
push esi
push 0x10
push esi
push esi
call fcn.00402462
push 0x40f32c
call dword [sym.imp.KERNEL32.dll_DeleteFileA]
xor eax, eax
mov ecx, dword [esp + 0x69c]
pop edi
pop esi
pop ebx
xor ecx, esp
call fcn.0040cb2e
mov esp, ebp
pop ebp
ret
mov ecx, dword [esp + 0xc]
mov edx, 0x44c
jmp 0x4055c8
push 7
push 0x40172c
push edi
push 0x401734
push 0xa
pop edx
mov ecx, ebx
call fcn.00406479
test eax, eax
je 0x4055bd
cmp dword [0x4108b4], 0x865
je 0x40572e
mov ecx, 0x40fe48
lea edx, [ecx + 1]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x405632
sub ecx, edx
lea eax, [ecx + 1]
mov ecx, ebx
push eax
push 0x40fe48
push 0x409
push 0x40173c
push 0xa
pop edx
call fcn.00406479
test eax, eax
je 0x4055bd
mov ecx, 0x40fc48
lea edx, [ecx + 1]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x405668
sub ecx, edx
lea eax, [ecx + 1]
mov ecx, ebx
push eax
push 0x40fc48
push 0x409
push 0x401748
push 0xa
pop edx
call fcn.00406479
test eax, eax
je 0x4055bd
mov ah, byte [0x410494]
mov edx, 0x410494
test ah, ah
je 0x4056c0
mov ecx, edx
lea edi, [ecx + 1]
mov dword [esp + 0x10], edi
mov edi, dword [esp + 0x18]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x4056b2
sub ecx, dword [esp + 0x10]
inc ecx
jmp 0x4056c3
push 7
pop ecx
test ah, ah
jne 0x4056cc
mov edx, 0x40172c
push ecx
push edx
push 0x409
push 0x401758
push 0xa
pop edx
mov ecx, ebx
call fcn.00406479
test eax, eax
je 0x4055bd
mov ah, byte [0x41069c]
mov edx, 0x41069c
test ah, ah
je 0x405714
mov ecx, edx
lea edi, [ecx + 1]
mov dword [esp + 0x10], edi
mov edi, dword [esp + 0x18]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x405706
sub ecx, dword [esp + 0x10]
inc ecx
jmp 0x405717
push 7
pop ecx
test ah, ah
jne 0x405720
mov edx, 0x40172c
push ecx
push edx
push 0x409
push 0x401760
jmp 0x40573b
push 7
push 0x40172c
push edi
push 0x40173c
push 0xa
pop edx
mov ecx, ebx
call fcn.00406479
test eax, eax
je 0x4055bd
push 4
push 0x4108b8
push edi
push 0x401768
push 0xa
pop edx
mov ecx, ebx
call fcn.00406479
test eax, eax
je 0x4055bd
cmp dword [0x40ee9c], esi
je 0x405790
mov ecx, 0x40f430
lea edx, [ecx + 1]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x40577c
sub ecx, edx
lea eax, [ecx + 1]
push eax
push 0x40f430
jmp 0x405797
push 7
push 0x40172c
push edi
push 0x401774
push 0xa
pop edx
mov ecx, ebx
call fcn.00406479
test eax, eax
je 0x4055bd
lea eax, [esp + 0x28]
push eax
push 0x40f93c
call dword [sym.imp.KERNEL32.dll_FindFirstFileA]
mov edi, dword [esp + 0x48]
sub edi, dword [esp + 0x44]
push eax
mov dword [esp + 0x20], edi
call dword [sym.imp.KERNEL32.dll_FindClose]
push esi
push esi
push 3
push esi
push esi
push 0x80000000
push 0x40f93c
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov dword [esp + 0x14], eax
cmp eax, 0xffffffff
jne 0x405804
push esi
push 0x10
push esi
push 0x40f93c
mov edx, 0x46a
jmp 0x405532
lea eax, [edi + 1]
push eax
push 0x40
call dword [sym.imp.KERNEL32.dll_LocalAlloc]
mov edi, eax
test edi, edi
jne 0x405824
mov edi, dword [esp + 0xc]
mov edx, 0x44c
jmp 0x4055c6
push esi
lea eax, [esp + 0x28]
push eax
push dword [esp + 0x24]
push edi
push dword [esp + 0x24]
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
jne 0x405850
push esi
push 0x10
push esi
push 0x40f93c
mov edx, 0x46b
jmp 0x405532
push dword [esp + 0x14]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push dword [esp + 0x1c]
mov ecx, ebx
push edi
push dword [esp + 0x20]
push 0x401780
push 0xa
pop edx
call fcn.00406479
push edi
test eax, eax
je 0x4055b7
call dword [sym.imp.KERNEL32.dll_LocalFree]
mov eax, dword [0x4108d4]
lea edi, [esp + 0x16c]
mov dword [esp + 0x10], eax
xor eax, eax
push 9
pop ecx
rep stosd dword es:[edi], eax
mov edi, dword [esp + 0x10]
jmp 0x405969
mov ecx, dword [edi]
lea edx, [ecx + 1]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x4058a6
sub ecx, edx
mov edx, dword [edi + 4]
lea eax, [edx + 1]
mov dword [esp + 0x10], eax
mov al, byte [edx]
inc edx
test al, al
jne 0x4058b9
sub edx, dword [esp + 0x10]
lea eax, [ecx + 1]
add eax, edx
push eax
push 0x40
mov dword [esp + 0x18], eax
call dword [sym.imp.KERNEL32.dll_LocalAlloc]
mov dword [esp + 0x14], eax
test eax, eax
je 0x405816
push dword [edi + 4]
mov edx, dword [esp + 0x14]
mov ecx, eax
call fcn.00401a45
push dword [edi]
mov edx, dword [esp + 0x14]
mov ecx, dword [esp + 0x18]
call fcn.00401acd
lea eax, [esp + 0x28]
push eax
push dword [esp + 0x18]
call dword [sym.imp.KERNEL32.dll_FindFirstFileA]
mov ecx, dword [esp + 0x48]
sub ecx, dword [esp + 0x44]
push eax
mov dword [esp + 0x20], ecx
call dword [sym.imp.KERNEL32.dll_FindClose]
push dword [esp + 0x14]
call dword [sym.imp.KERNEL32.dll_LocalFree]
mov ebx, esi
mov ecx, 0x200
mov esi, dword [esp + 0x1c]
xor edx, edx
mov eax, esi
div ecx
neg edx
sbb edx, edx
imul eax, ecx
and edx, ecx
add ecx, ecx
add edx, eax
add dword [esp + ebx*4 + 0x16c], edx
inc ebx
cmp ebx, 8
jl 0x405936
mov ebx, dword [esp + 0x20]
mov eax, esi
add dword [esp + 0x18c], eax
mov edi, dword [edi + 0xc]
push 0
pop esi
test edi, edi
jne 0x4058a1
mov ecx, esi
mov eax, dword [esp + ecx*4 + 0x16c]
add eax, 0x3ff
shr eax, 0xa
mov dword [esp + ecx*4 + 0x16c], eax
inc ecx
cmp ecx, 8
jl 0x405973
mov edi, dword [esp + 0x18]
lea eax, [esp + 0x16c]
push 0x24
push eax
push edi
push 0x401788
push 0xa
pop edx
mov ecx, ebx
call fcn.00406479
test eax, eax
je 0x4055bd
push 4
push 0x4108c4
push edi
push 0x401794
push 0xa
pop edx
mov ecx, ebx
call fcn.00406479
test eax, eax
je 0x4055bd
push 4
push 0x4108bc
push edi
push 0x40179c
push 0xa
pop edx
mov ecx, ebx
call fcn.00406479
test eax, eax
je 0x4055bd
mov edx, dword [0x4108a4]
test edx, edx
je 0x405a2e
mov ecx, edx
lea eax, [ecx + 1]
mov dword [esp + 0x20], eax
mov al, byte [ecx]
inc ecx
test al, al
jne 0x405a06
sub ecx, dword [esp + 0x20]
lea eax, [ecx + 1]
mov ecx, ebx
push eax
push edx
push edi
push 0x4017a8
push 0xa
pop edx
call fcn.00406479
test eax, eax
je 0x4055bd
push 4
push 0x4108cc
push edi
push 0x4017b8
push 0xa
pop edx
mov ecx, ebx
call fcn.00406479
mov edi, dword [esp + 0xc]
test eax, eax
je 0x4055c1
push ebx
lea edx, [esp + 0x194]
mov ecx, edi
call fcn.0040bcd2
test eax, eax
jne 0x405a6e
mov edx, 0x471
jmp 0x4055c6
mov eax, dword [0x4108d0]
test eax, eax
je 0x405a95
push dword [eax]
mov ecx, ebx
push eax
push dword [esp + 0x20]
push 0x4017c8
push 0xa
pop edx
call fcn.00406479
test eax, eax
je 0x4055c1
mov edx, 0x40f32c
mov ecx, ebx
call fcn.0040674d
test eax, eax
je 0x4055c1
mov ecx, ebx
call fcn.004065c0
test eax, eax
jne 0x405abe
mov edx, 0x45e
jmp 0x4055c6
xor eax, eax
inc eax
jmp 0x4055df