Function at 0x477830
Capabilities:
Check if file exists
Copy file
Extract resource via kernel32 functions
Get common file path
Move file
Set file attributes
Write file on windows

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x4a1fea
mov eax, dword fs:[0]
push eax
sub esp, 0x2c0
mov eax, dword [0x4c4330]
xor eax, ebp
mov dword [ebp - 0x14], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov eax, dword [ebp + 8]
mov dword [ebp - 0x278], eax
add eax, 0xc
mov dword [ebp - 0x27c], eax
mov eax, dword [eax]
sub eax, 0x10
mov dword [ebp - 0x280], 1
call fcn.0045c0b0
add eax, 0x10
mov dword [ebp - 0x268], eax
push 0xa
push str.Archive.7z
lea ebx, [ebp - 0x268]
mov dword [ebp - 4], 0
call fcn.0045a3e0
mov ebx, dword [ebp - 0x268]
push ecx
mov ecx, dword [ebx - 0x10]
mov eax, dword [ecx]
mov edx, dword [eax + 0x10]
add ebx, 0xfffffff0
mov dword [ebp - 0x26c], esp
mov esi, esp
mov dword [ebp - 0x26c], ebx
call edx
cmp dword [ebx + 0xc], 0
lea edx, [ebx + 0xc]
jl 0x4778e2
cmp eax, dword [ebx]
jne 0x4778e2
mov edi, ebx
mov eax, 1
lock xadd dword [edx], eax
jmp 0x47791e
mov ecx, dword [ebx + 4]
mov edx, dword [eax]
mov edx, dword [edx]
push 2
push ecx
mov ecx, eax
call edx
mov edi, eax
test edi, edi
jne 0x4778fb
call fcn.00458bc0
mov eax, dword [ebx + 4]
mov dword [edi + 4], eax
mov eax, dword [ebx + 4]
lea ecx, [eax + eax + 2]
push ecx
lea edx, [ebx + 0x10]
push edx
lea eax, [eax + eax + 2]
push eax
lea ecx, [edi + 0x10]
push ecx
call fcn.00487870
add esp, 0x10
add edi, 0x10
mov dword [esi], edi
call fcn.0045b820
mov esi, dword [0x4ca19c]
add esp, 4
push str.RESOURCE_DATA
push 0x8a
push esi
call dword [sym.imp.KERNEL32.dll_FindResourceW]
mov edi, eax
test edi, edi
je 0x4779bc
push edi
push esi
call dword [sym.imp.KERNEL32.dll_SizeofResource]
mov dword [ebp - 0x264], eax
test eax, eax
je 0x4779bc
push edi
push esi
call dword [sym.imp.KERNEL32.dll_LoadResource]
test eax, eax
je 0x4779bc
push eax
call dword [sym.imp.KERNEL32.dll_LockResource]
mov dword [ebp - 0x258], eax
test eax, eax
je 0x4779bc
mov edi, dword [ebp - 0x268]
mov ecx, edi
call fcn.0045b0b0
mov esi, eax
cmp esi, 0xffffffff
je 0x4779c2
mov eax, dword [ebp - 0x264]
mov ecx, dword [ebp - 0x258]
push 0
lea edx, [ebp - 0x25c]
push edx
push eax
push ecx
push esi
mov dword [ebp - 0x25c], 0
call dword [sym.imp.KERNEL32.dll_WriteFile]
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
jmp 0x4779c2
mov edi, dword [ebp - 0x268]
push 2
push edi
call dword [sym.imp.KERNEL32.dll_SetFileAttributesW]
mov edx, dword [ebp - 0x27c]
push 0
mov ecx, edi
mov edi, dword [edx]
push 0
call fcn.0045a290
add esp, 8
test eax, eax
je 0x477a0d
mov edi, dword [ebp - 0x278]
add edi, 0x6c
lea eax, [ebp - 0x258]
mov dword [ebp - 0x258], 0x3e9
call fcn.00479ea0
mov edi, 0x3e9
jmp 0x477f5c
xor eax, eax
push 0x206
push eax
lea ecx, [ebp - 0x21a]
push ecx
mov word [ebp - 0x21c], ax
call fcn.00488d60
add esp, 0xc
push 1
push 0x23
lea edx, [ebp - 0x21c]
push edx
push 0
call dword [sym.imp.SHELL32.dll_SHGetSpecialFolderPathW]
mov eax, dword [section..data]
mov edx, dword [eax + 0xc]
mov ecx, section..data
call edx
add eax, 0x10
mov dword [ebp - 0x25c], eax
lea eax, [ebp - 0x21c]
mov byte [ebp - 4], 1
test eax, 0xffff0000
jne 0x477a85
mov ecx, eax
movzx edi, cx
call fcn.0045a4e0
test eax, eax
je 0x477ab4
push eax
mov eax, edi
lea edi, [ebp - 0x25c]
call fcn.0045a690
jmp 0x477ab4
lea eax, [ebp - 0x21c]
lea edx, [eax + 2]
mov edi, edi
mov cx, word [eax]
add eax, 2
test cx, cx
jne 0x477a90
sub eax, edx
lea edx, [ebp - 0x21c]
sar eax, 1
push edx
lea ecx, [ebp - 0x25c]
push ecx
mov ebx, eax
call fcn.0045a790
lea edx, [ebp - 0x25c]
push edx
lea eax, [ebp - 0x258]
push eax
mov ebx, str.BaofengStormPlayerProfilesMovieList_
mov byte [ebp - 4], 2
call fcn.0045bec0
mov byte [ebp - 4], 3
mov eax, dword [eax]
push 0
push eax
call fcn.0045b3e0
mov byte [ebp - 4], 2
mov eax, dword [ebp - 0x258]
add eax, 0xfffffff0
add esp, 0x10
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x477b07
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
push 0x1e
push str.BaofengStormPlayerProfiles_
lea ebx, [ebp - 0x25c]
call fcn.0045a3e0
mov ecx, ebx
push ecx
lea edx, [ebp - 0x258]
push edx
mov ebx, str.DZone_
call fcn.0045bec0
mov byte [ebp - 4], 4
mov eax, dword [eax]
push eax
call fcn.0045b280
mov byte [ebp - 4], 2
mov eax, dword [ebp - 0x258]
add eax, 0xfffffff0
add esp, 0xc
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x477b62
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
lea ecx, [ebp - 0x25c]
push ecx
lea edx, [ebp - 0x258]
push edx
mov ebx, str.DZone_
call fcn.0045bec0
mov byte [ebp - 4], 5
mov eax, dword [eax]
push eax
call fcn.0045b280
mov byte [ebp - 4], 2
mov eax, dword [ebp - 0x258]
add eax, 0xfffffff0
add esp, 0xc
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x477baf
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
lea ecx, [ebp - 0x25c]
push ecx
lea edx, [ebp - 0x260]
push edx
mov ebx, str.DZoneDownloadConfig.xml
call fcn.0045bec0
lea eax, [ebp - 0x25c]
push eax
lea ecx, [ebp - 0x274]
push ecx
mov ebx, str.DZoneDownloadList.xml
mov byte [ebp - 4], 6
call fcn.0045bec0
lea edx, [ebp - 0x25c]
push edx
lea eax, [ebp - 0x258]
push eax
mov ebx, 0x4af018
mov byte [ebp - 4], 7
call fcn.0045bec0
mov ecx, dword [ebp - 0x260]
mov eax, dword [eax]
add esp, 0x18
push 3
push ecx
push eax
call dword [sym.imp.KERNEL32.dll_MoveFileExW]
mov eax, dword [ebp - 0x258]
add eax, 0xfffffff0
lea edx, [eax + 0xc]
or ecx, 0xffffffff
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jg 0x477c36
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov ecx, dword [ebp - 0x274]
push ecx
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
jne 0x477c5c
mov edx, dword [ebp - 0x274]
push eax
mov eax, dword [ebp - 0x260]
push edx
push eax
call dword [sym.imp.KERNEL32.dll_CopyFileW]
push ecx
mov ecx, esp
lea edx, [ebp - 0x25c]
mov dword [ebp - 0x258], esp
push edx
push ecx
mov ebx, str.Config.ini
call fcn.0045bec0
add esp, 8
lea eax, [ebp - 0x2cc]
push eax
call fcn.0045c6a0
mov byte [ebp - 4], 8
mov edx, dword [section..data]
mov eax, dword [edx + 0xc]
push ecx
mov esi, esp
mov ecx, section..data
mov dword [ebp - 0x258], esp
mov dword [ebp - 0x264], esi
call eax
add eax, 0x10
mov dword [esi], eax
mov ecx, str.DZone
mov byte [ebp - 4], 9
test ecx, 0xffff0000
jne 0x477cd9
mov edx, ecx
movzx edi, dx
call fcn.0045a4e0
test eax, eax
je 0x477ce9
push eax
mov eax, edi
mov edi, esi
call fcn.0045a690
jmp 0x477ce9
push str.DZone
push esi
mov ebx, 5
call fcn.0045a790
mov byte [ebp - 4], 0xa
mov eax, dword [section..data]
mov edx, dword [eax + 0xc]
push ecx
mov esi, esp
mov dword [ebp - 0x264], esp
mov ecx, section..data
mov dword [ebp - 0x264], esi
call edx
add eax, 0x10
mov dword [esi], eax
mov eax, 0x4ae634
mov byte [ebp - 4], 0xb
test eax, 0xffff0000
jne 0x477d3a
mov ecx, eax
movzx edi, cx
call fcn.0045a4e0
test eax, eax
je 0x477d4a
push eax
mov eax, edi
mov edi, esi
call fcn.0045a690
jmp 0x477d4a
push 0x4ae634
push esi
mov ebx, 3
call fcn.0045a790
mov byte [ebp - 4], 0xa
lea edi, [ebp - 0x270]
lea esi, [ebp - 0x2cc]
mov byte [ebp - 4], 8
call fcn.0045c820
mov byte [ebp - 4], 0xc
mov eax, dword [ebp - 0x270]
xor edx, edx
mov ecx, eax
mov dword [ebp - 0x224], 7
mov dword [ebp - 0x228], 0
mov word [ebp - 0x238], dx
lea esi, [ecx + 2]
nop
mov dx, word [ecx]
add ecx, 2
test dx, dx
jne 0x477d90
sub ecx, esi
sar ecx, 1
push ecx
lea ecx, [ebp - 0x238]
call fcn.00458f80
lea ecx, [ebp - 0x238]
lea ebx, [ebp - 0x254]
mov byte [ebp - 4], 0xd
call fcn.004587f0
mov edi, 0x10
cmp dword [eax + 0x14], edi
jb 0x477dcc
mov eax, dword [eax]
push eax
call fcn.00488643
add esp, 4
movzx esi, ax
cmp dword [ebp - 0x240], edi
jb 0x477def
mov eax, dword [ebp - 0x254]
push eax
call fcn.00485b51
add esp, 4
xor ebx, ebx
mov byte [ebp - 4], 0xc
cmp dword [ebp - 0x224], 8
mov dword [ebp - 0x240], 0xf
mov dword [ebp - 0x244], ebx
mov byte [ebp - 0x254], bl
jb 0x477e23
mov ecx, dword [ebp - 0x238]
push ecx
call fcn.00485b51
add esp, 4
mov edx, dword [ebp - 0x270]
cmp dword [edx - 0xc], ebx
je 0x477e45
cmp si, 2
jg 0x477e45
mov eax, dword [ebp - 0x260]
push eax
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
jne 0x477ea3
mov ecx, dword [ebp - 0x27c]
push ecx
lea edx, [ebp - 0x258]
push edx
mov ebx, str.ApplicationDataProfilesDZoneDownloadConfig.xml
call fcn.0045bec0
mov ecx, dword [ebp - 0x260]
mov eax, dword [eax]
add esp, 8
push 3
push ecx
push eax
call dword [sym.imp.KERNEL32.dll_MoveFileExW]
mov eax, dword [ebp - 0x258]
add eax, 0xfffffff0
lea edx, [eax + 0xc]
or ecx, 0xffffffff
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jg 0x477e94
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov ecx, dword [ebp - 0x278]
mov dword [ecx + 0x5c], 1
xor ebx, ebx
mov ecx, dword [ebp - 0x278]
call fcn.00477fc0
mov byte [ebp - 4], 8
mov eax, dword [ebp - 0x270]
add eax, 0xfffffff0
lea edx, [eax + 0xc]
or ecx, 0xffffffff
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jg 0x477ed4
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
lea esi, [ebp - 0x2cc]
call fcn.0045c760
mov byte [ebp - 4], 6
mov eax, dword [ebp - 0x274]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x477f05
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov byte [ebp - 4], 2
mov eax, dword [ebp - 0x260]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x477f2b
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov byte [ebp - 4], bl
mov eax, dword [ebp - 0x25c]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x477f50
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov edi, dword [ebp - 0x280]
mov ebx, dword [ebp - 0x26c]
push ecx
mov eax, ebx
mov dword [ebp - 0x26c], esp
mov esi, esp
call fcn.0045c0b0
add eax, 0x10
mov dword [esi], eax
call fcn.0045b820
add esp, 4
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebx + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x477f99
mov ecx, dword [ebx]
mov eax, dword [ecx]
mov edx, dword [eax + 4]
push ebx
call edx
mov eax, edi
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x14]
xor ecx, ebp
call fcn.00485631
mov esp, ebp
pop ebp
ret 4