Function at 0x40d1e0
Capabilities:
Check if file exists
Copy file
Get common file path
Get file attributes
Get file size
Write file on windows

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x55218e
mov eax, dword fs:[0]
push eax
sub esp, 0xb38
mov eax, dword [0x5a0800]
xor eax, ebp
mov dword [ebp - 0x10], eax
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov edx, dword [ebp + 8]
xorps xmm0, xmm0
mov ecx, edx
mov dword [ebp - 0x6c0], 0
movups xmmword [ebp - 0x6d0], xmm0
mov dword [ebp - 0x6bc], 0
lea esi, [ecx + 1]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x40d233
sub ecx, esi
push ecx
push edx
lea ecx, [ebp - 0x6d0]
call fcn.004015d0
mov dword [ebp - 4], 0
mov dword [ebp - 0xb3c], 0
mov dword [ebp - 0xb38], 0
mov dword [ebp - 0xb34], 0
xorps xmm0, xmm0
mov dword [ebp - 0x678], 1
movups xmmword [ebp - 0x688], xmm0
mov dword [ebp - 0x674], 0xf
mov word [ebp - 0x688], 0x20
lea eax, [ebp - 0x688]
mov byte [ebp - 4], 2
push eax
lea eax, [ebp - 0xb3c]
push eax
lea eax, [ebp - 0x6d0]
push eax
call fcn.0040e250
mov ecx, dword [ebp - 0x674]
add esp, 0xc
mov byte [ebp - 4], 1
cmp ecx, 0xf
jbe 0x40d2f4
mov edx, dword [ebp - 0x688]
inc ecx
mov eax, edx
cmp ecx, 0x1000
jb 0x40d2ea
mov edx, dword [eax - 4]
add ecx, 0x23
sub eax, edx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x40dcb0
push ecx
push edx
call fcn.004e6cae
add esp, 8
mov ecx, dword [ebp - 0xb38]
mov eax, 0x2aaaaaab
mov edi, dword [ebp - 0xb3c]
sub ecx, edi
imul ecx
sar edx, 2
mov esi, edx
shr esi, 0x1f
add esi, edx
cmp esi, 3
ja 0x40d329
push 0x10
push 0x55cb2c
push 0x55d174
jmp 0x40db9d
push str._pack
push edi
call fcn.00407660
add esp, 8
test al, al
je 0x40d34c
push 0x10
push 0x55cb2c
push 0x55d190
jmp 0x40db9d
push 0x208
lea eax, [ebp - 0x628]
push 0
push eax
call fcn.004ea040
push 0x208
lea eax, [ebp - 0x218]
push 0
push eax
call fcn.004ea040
add esp, 0x18
lea eax, [ebp - 0x218]
push eax
push 0x104
call dword [sym.imp.KERNEL32.dll_GetCurrentDirectoryW]
mov eax, dword [edi + 0x28]
lea ecx, [edi + 0x18]
test eax, eax
je 0x40db91
cmp eax, 0x20
jae 0x40db91
push ecx
lea eax, [ebp - 0x670]
push eax
call fcn.0040b2b0
add esp, 8
lea eax, [ebp - 0x218]
mov byte [ebp - 4], 3
push eax
lea ecx, [ebp - 0x640]
call fcn.004086d0
push 0x5c
lea ecx, [ebp - 0x640]
mov byte [ebp - 4], 4
call fcn.00409be0
cmp dword [ebp - 0x65c], 7
lea eax, [ebp - 0x670]
push dword [ebp - 0x660]
cmova eax, dword [ebp - 0x670]
lea ecx, [ebp - 0x640]
push eax
call fcn.0040f080
cmp dword [ebp - 0x62c], 7
lea eax, [ebp - 0x640]
cmova eax, dword [ebp - 0x640]
push eax
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
je 0x40db2e
test al, 0x10
jne 0x40db2e
cmp dword [ebp - 0x62c], 7
lea eax, [ebp - 0x640]
cmova eax, dword [ebp - 0x640]
push eax
call fcn.0040c380
mov ecx, eax
mov dword [ebp - 0xb20], eax
add esp, 4
mov dword [ebp - 0xb24], edx
add ecx, 0xffffffff
mov eax, edx
adc eax, 0xfffffffe
cmp eax, 6
ja 0x40db20
jb 0x40d46e
cmp ecx, 0xffffffff
ja 0x40db20
mov eax, dword [edi + 0x40]
test eax, eax
je 0x40db12
cmp eax, 0x20
jae 0x40db12
mov ecx, dword [edi + 0x58]
test ecx, ecx
je 0x40db04
cmp ecx, 0x100
jae 0x40db04
cmp dword [edi + 0x5c], 0xf
lea edx, [edi + 0x48]
jbe 0x40d4a5
mov edx, dword [edi + 0x48]
push 4
push str.http
push 0
push ecx
push edx
call fcn.00408390
add esp, 0x14
cmp eax, 0xffffffff
jne 0x40d4ce
push 0x10
push 0x55d1a4
push 0x55d2a0
jmp 0x40db6a
mov dword [ebp - 0xb2c], 0
cmp esi, 4
jbe 0x40d511
cmp dword [edi + 0x74], 0xf
lea eax, [edi + 0x60]
jbe 0x40d4e8
mov eax, dword [eax]
push eax
call fcn.0051320b
add esp, 4
mov dword [ebp - 0xb2c], eax
test eax, eax
js 0x40d500
cmp eax, 3
jle 0x40d511
push 0x10
push 0x55d1a4
push 0x55d2b4
jmp 0x40db6a
mov dword [ebp - 0xb28], 0
cmp esi, 5
jbe 0x40d557
cmp dword [edi + 0x8c], 0xf
lea eax, [edi + 0x78]
jbe 0x40d52e
mov eax, dword [eax]
push eax
call fcn.0051320b
add esp, 4
mov dword [ebp - 0xb28], eax
test eax, eax
js 0x40d546
cmp eax, 2
jle 0x40d557
push 0x10
push 0x55d1a4
push str._rN_e
jmp 0x40db6a
push 0x400
lea eax, [ebp - 0xb18]
push 0
push eax
call fcn.004ea040
cmp dword [ebp - 0x65c], 7
lea eax, [ebp - 0x670]
cmova eax, dword [ebp - 0x670]
push eax
lea eax, [ebp - 0xb04]
push 0x20
push eax
call fcn.00511a08
mov eax, dword [ebp - 0xb20]
mov dword [ebp - 0xb10], eax
mov eax, dword [ebp - 0xb24]
mov dword [ebp - 0xb0c], eax
lea eax, [edi + 0x30]
push eax
lea eax, [ebp - 0x718]
push eax
call fcn.0040b2b0
cmp dword [ebp - 0x704], 7
lea eax, [ebp - 0x718]
cmova eax, dword [ebp - 0x718]
push eax
lea eax, [ebp - 0xac4]
push 0x20
push eax
call fcn.00511a08
mov eax, dword [str.https:]
xorps xmm0, xmm0
movups xmmword [ebp - 0x6a0], xmm0
mov dword [ebp - 0x6a0], eax
add esp, 0x2c
mov ax, word [0x55d2e0]
mov dword [ebp - 0x690], 6
mov dword [ebp - 0x68c], 0xf
mov word [ebp - 0x69c], ax
mov byte [ebp - 0x69a], 0
mov eax, dword [str.http:]
movups xmmword [ebp - 0x6b8], xmm0
mov dword [ebp - 0x6b8], eax
mov al, byte [0x55d2e8]
mov dword [ebp - 0x6a8], 5
mov dword [ebp - 0x6a4], 0xf
mov byte [ebp - 0x6b4], al
mov byte [ebp - 0x6b3], 0
lea eax, [edi + 0x48]
mov byte [ebp - 4], 7
push eax
lea ecx, [ebp - 0x658]
call fcn.00402700
push 0
lea eax, [ebp - 0x6a0]
mov byte [ebp - 4], 8
push eax
lea ecx, [ebp - 0x658]
call fcn.0040fc40
cmp eax, 0xffffffff
je 0x40d815
push 0
lea eax, [ebp - 0x6a0]
push eax
lea ecx, [ebp - 0x658]
call fcn.0040fc40
push 5
lea ecx, [ebp - 0x6b8]
push ecx
push 6
push eax
lea ecx, [ebp - 0x658]
call fcn.00410600
lea ecx, [ebp - 0x658]
cmp ecx, eax
je 0x40d815
cmp dword [eax + 0x14], 0xf
mov edx, eax
mov dword [ebp - 0xb20], eax
jbe 0x40d6d3
mov edx, dword [eax]
mov dword [ebp - 0xb20], edx
mov eax, dword [eax + 0x10]
mov ecx, dword [ebp - 0x644]
mov dword [ebp - 0xb24], eax
mov dword [ebp - 0xb40], ecx
cmp eax, ecx
ja 0x40d71c
cmp ecx, 0xf
mov dword [ebp - 0x648], eax
push eax
lea esi, [ebp - 0x658]
cmova esi, dword [ebp - 0x658]
push edx
push esi
call fcn.004e9ac0
mov eax, dword [ebp - 0xb24]
add esp, 0xc
mov byte [esi + eax], 0
jmp 0x40d815
cmp eax, 0x7fffffff
ja 0x40dcab
mov esi, eax
or esi, 0xf
cmp esi, 0x7fffffff
jbe 0x40d749
mov eax, SysReAllocString
mov esi, SysReAllocString
push eax
call fcn.00401580
add esp, 4
jmp 0x40d79b
mov edx, ecx
mov eax, SysReAllocString
shr edx, 1
sub eax, edx
cmp ecx, eax
jbe 0x40d76d
mov eax, SysReAllocString
mov esi, SysReAllocString
push eax
call fcn.00401580
add esp, 4
jmp 0x40d79b
lea eax, [ecx + edx]
cmp esi, eax
cmovb esi, eax
lea eax, [esi + 1]
cmp eax, 0x1000
jb 0x40d78a
push eax
call fcn.00401580
add esp, 4
jmp 0x40d79b
test eax, eax
je 0x40d799
push eax
call fcn.004e6c7e
add esp, 4
jmp 0x40d79b
xor eax, eax
mov dword [ebp - 0xb30], eax
mov eax, dword [ebp - 0xb24]
push eax
push dword [ebp - 0xb20]
mov dword [ebp - 0x644], esi
mov esi, dword [ebp - 0xb30]
push esi
mov dword [ebp - 0x648], eax
call fcn.004e9540
mov eax, dword [ebp - 0xb24]
add esp, 0xc
mov byte [esi + eax], 0
mov eax, dword [ebp - 0xb40]
cmp eax, 0xf
jbe 0x40d80f
mov edx, dword [ebp - 0x658]
lea ecx, [eax + 1]
mov eax, edx
cmp ecx, 0x1000
jb 0x40d805
mov edx, dword [eax - 4]
add ecx, 0x23
sub eax, edx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x40dcb0
push ecx
push edx
call fcn.004e6cae
add esp, 8
mov dword [ebp - 0x658], esi
lea eax, [ebp - 0x658]
push eax
lea eax, [ebp - 0x700]
push eax
call fcn.0040b2b0
cmp dword [ebp - 0x6ec], 7
lea eax, [ebp - 0x700]
mov byte [ebp - 4], 9
cmova eax, dword [ebp - 0x700]
push eax
lea eax, [ebp - 0xa3c]
push 0x100
push eax
call fcn.00511a08
mov eax, dword [ebp - 0xb28]
mov dword [ebp - 0xb14], eax
mov eax, dword [ebp - 0xb2c]
push 0
mov dword [ebp - 0xb08], eax
mov dword [ebp - 0xb18], 0x400
call fcn.0051363c
cmp dword [ebp - 0x62c], 7
lea ecx, [ebp - 0x83c]
push 0
mov dword [ebp - 0xa44], eax
lea eax, [ebp - 0x640]
cmova eax, dword [ebp - 0x640]
push 0x10
push ecx
push eax
mov dword [ebp - 0xa40], edx
mov dword [ebp - 0x71c], 1
call fcn.0040b6e0
add esp, 0x28
test al, al
jne 0x40d8dd
push 0x10
push 0x55d1a4
push 0x55d2ec
push 0
call dword [sym.imp.USER32.dll_MessageBoxW]
mov byte [ebp - 0xb19], 0
jmp 0x40dad6
cmp dword [ebp - 0x62c], 7
lea ecx, [ebp - 0x82c]
push 2
push 0x10
lea eax, [ebp - 0x640]
cmova eax, dword [ebp - 0x640]
push ecx
push eax
call fcn.0040b6e0
add esp, 0x10
test al, al
jne 0x40d929
push 0x10
push 0x55d1a4
push 0x55d300
push 0
call dword [sym.imp.USER32.dll_MessageBoxW]
mov byte [ebp - 0xb19], 0
jmp 0x40dad6
push 0x208
lea eax, [ebp - 0x420]
push 0
push eax
call fcn.004ea040
add esp, 0xc
lea eax, [ebp - 0x420]
push 0x104
push eax
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleHandleW]
push eax
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
lea eax, [ebp - 0x218]
push eax
lea ecx, [ebp - 0x6e8]
call fcn.004086d0
push 0x55d314
lea ecx, [ebp - 0x6e8]
mov byte [ebp - 4], 0xa
call fcn.00409bb0
cmp dword [ebp - 0x6d4], 7
lea esi, [ebp - 0x6e8]
push 0
cmova esi, dword [ebp - 0x6e8]
lea eax, [ebp - 0x420]
push esi
push eax
call dword [sym.imp.KERNEL32.dll_CopyFileW]
test eax, eax
je 0x40daaa
push 0
push 0x80
push 4
push 0
push 0
push 0x40000000
push esi
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov esi, eax
mov dword [ebp - 0xb20], esi
cmp esi, 0xffffffff
je 0x40daaa
lea eax, [ebp - 0xb44]
push eax
push esi
call dword [sym.imp.KERNEL32.dll_GetFileSizeEx]
test eax, eax
je 0x40daaa
push 0
push 0
push dword [ebp - 0xb40]
push dword [ebp - 0xb44]
push esi
call dword [sym.imp.KERNEL32.dll_SetFilePointerEx]
test eax, eax
je 0x40daaa
lea ecx, [ebp - 0xb18]
mov dword [ebp - 0xb2c], 0
mov byte [ebp - 0xb19], 1
mov esi, 0x400
xor edi, edi
mov dword [ebp - 0xb28], ecx
nop
test edi, edi
jne 0x40da3e
mov eax, esi
cmp esi, 0x1000000
jb 0x40da43
mov eax, 0x1000000
push 0
lea edx, [ebp - 0xb2c]
push edx
push eax
push ecx
push dword [ebp - 0xb20]
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x40da85
sub esi, dword [ebp - 0xb2c]
mov ecx, dword [ebp - 0xb28]
sbb edi, 0
add ecx, dword [ebp - 0xb2c]
mov dword [ebp - 0xb28], ecx
test edi, edi
ja 0x40da3e
jb 0x40da8c
test esi, esi
jne 0x40da30
jmp 0x40da8c
mov byte [ebp - 0xb19], 0
push dword [ebp - 0xb20]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
cmp byte [ebp - 0xb19], 0
je 0x40daaa
mov byte [ebp - 0xb19], 1
jmp 0x40dac5
push 0x10
push 0x55d1a4
push 0x55d328
push 0
call dword [sym.imp.USER32.dll_MessageBoxW]
mov byte [ebp - 0xb19], 0
lea ecx, [ebp - 0x6e8]
call fcn.00409100
mov edi, dword [ebp - 0xb3c]
lea ecx, [ebp - 0x700]
call fcn.00409100
lea ecx, [ebp - 0x658]
call fcn.00402dd0
lea ecx, [ebp - 0x6b8]
call fcn.00402dd0
lea ecx, [ebp - 0x718]
call fcn.00409100
jmp 0x40db79
push 0x10
push 0x55d1a4
push 0x55d270
jmp 0x40db6a
push 0x10
push 0x55d1a4
push str.Hr_g
jmp 0x40db6a
push 0x10
push 0x55d1a4
push 0x55d1f0
jmp 0x40db6a
cmp dword [ebp - 0x62c], 7
lea eax, [ebp - 0x640]
cmova eax, dword [ebp - 0x640]
push eax
push 0x55d1d4
lea eax, [ebp - 0x628]
push 0x104
push eax
call fcn.00411760
add esp, 0x10
lea eax, [ebp - 0x628]
push 0x10
push 0x55d1a4
push eax
push 0
call dword [sym.imp.USER32.dll_MessageBoxW]
mov byte [ebp - 0xb19], 0
lea ecx, [ebp - 0x640]
call fcn.00409100
lea ecx, [ebp - 0x670]
call fcn.00409100
jmp 0x40dbac
push 0x10
push 0x55d1a4
push 0x55d1ac
push 0
call dword [sym.imp.USER32.dll_MessageBoxW]
mov byte [ebp - 0xb19], 0
test edi, edi
je 0x40dc54
mov eax, dword [ebp - 0xb38]
mov esi, edi
cmp esi, eax
je 0x40dc11
mov ecx, dword [esi + 0x14]
cmp ecx, 0xf
jbe 0x40dbf9
mov eax, dword [esi]
inc ecx
cmp ecx, 0x1000
jb 0x40dbe9
mov edx, dword [eax - 4]
add ecx, 0x23
sub eax, edx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x40dcb0
mov eax, edx
push ecx
push eax
call fcn.004e6cae
mov eax, dword [ebp - 0xb38]
add esp, 8
mov dword [esi + 0x10], 0
mov dword [esi + 0x14], 0xf
mov byte [esi], 0
add esi, 0x18
cmp esi, eax
jne 0x40dbc0
mov ecx, dword [ebp - 0xb34]
mov eax, 0x2aaaaaab
sub ecx, edi
imul ecx
sar edx, 2
mov eax, edx
shr eax, 0x1f
add eax, edx
lea ecx, [eax + eax*2]
mov eax, edi
shl ecx, 3
cmp ecx, 0x1000
jb 0x40dc4a
mov edi, dword [eax - 4]
add ecx, 0x23
sub eax, edi
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x40dcb0
push ecx
push edi
call fcn.004e6cae
add esp, 8
mov ecx, dword [ebp - 0x6bc]
cmp ecx, 0xf
jbe 0x40dc8a
mov edx, dword [ebp - 0x6d0]
inc ecx
mov eax, edx
cmp ecx, 0x1000
jb 0x40dc80
mov edx, dword [eax - 4]
add ecx, 0x23
sub eax, edx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x40dcb0
push ecx
push edx
call fcn.004e6cae
add esp, 8
mov al, byte [ebp - 0xb19]
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.004e6d11
mov esp, ebp
pop ebp
ret
call fcn.00406990
call fcn.004f7238
int3