Function at 0x10004070
Capabilities:
Copy file
Get session user name

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x1006b75c
mov eax, dword fs:[0]
push eax
sub esp, 0x7d0
mov eax, dword [0x1008b06c]
xor eax, ebp
mov dword [ebp - 0x10], eax
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov dword [ebp - 0x724], 0
mov eax, 2
imul ecx, eax, 0
movzx edx, word [ecx + 0x1008d480]
test edx, edx
jne 0x100041bb
xor eax, eax
mov word [ebp - 0x130], ax
push 0xfe
push 0
lea ecx, [ebp - 0x12e]
push ecx
call fcn.10051430
add esp, 0xc
mov dword [ebp - 0x75c], 0x80
lea edx, [ebp - 0x75c]
push edx
lea eax, [ebp - 0x130]
push eax
call dword [sym.imp.ADVAPI32.dll_GetUserNameW]
test eax, eax
je 0x100041bb
lea ecx, [ebp - 0x130]
test ecx, ecx
je 0x100041a4
mov edx, 0x1007c42c
test edx, edx
je 0x100041a4
push str.system
lea eax, [ebp - 0x130]
push eax
call dword [sym.imp.KERNEL32.dll_lstrcmpiW]
test eax, eax
jne 0x100041a4
push str.agentUser
push 0x1007c460
push 0x80000002
lea ecx, [ebp - 0x580]
push ecx
call fcn.10031380
add esp, 0x10
lea ecx, [ebp - 0x580]
call fcn.10004ce0
movzx edx, al
test edx, edx
je 0x1000417b
push 0x80
lea eax, [ebp - 0x130]
push eax
push 0x1008d480
call dword [sym.imp.KERNEL32.dll_lstrcpynW]
jmp 0x10004197
push 0x80
lea ecx, [ebp - 0x580]
call fcn.10004d30
push eax
push 0x1008d480
call dword [sym.imp.KERNEL32.dll_lstrcpynW]
lea ecx, [ebp - 0x580]
call fcn.10004d70
jmp 0x100041bb
push 0x80
lea ecx, [ebp - 0x130]
push ecx
push 0x1008d480
call dword [sym.imp.KERNEL32.dll_lstrcpynW]
mov edx, 1
imul eax, edx, 0
movsx ecx, byte [eax + 0x1008d588]
test ecx, ecx
jne 0x1000420a
lea edx, [ebp - 0x610]
push edx
call fcn.10006d50
add esp, 4
mov dword [ebp - 0x760], eax
push 0x80
mov ecx, dword [ebp - 0x760]
call fcn.10004ef0
push eax
push 0x1008d588
call dword [sym.imp.KERNEL32.dll_lstrcpynA]
lea ecx, [ebp - 0x610]
call fcn.10004f30
mov eax, 2
imul ecx, eax, 0
movzx edx, word [ecx + 0x1008d480]
test edx, edx
je 0x10004230
mov eax, 1
imul ecx, eax, 0
movsx edx, byte [ecx + 0x1008d588]
test edx, edx
jne 0x10004237
xor eax, eax
jmp 0x100049c0
cmp dword [ebp + 8], 0
je 0x1000424c
mov ecx, dword [ebp + 0xc]
call fcn.1001d780
movzx eax, al
test eax, eax
jne 0x10004253
xor eax, eax
jmp 0x100049c0
push str.i_action
lea ecx, [ebp - 0x5b0]
call fcn.10005000
mov dword [ebp - 4], 0
sub esp, 0x18
mov ecx, esp
mov dword [ebp - 0x7a8], esp
push 0x1007c3aa
call fcn.10005000
mov dword [ebp - 0x7a4], eax
lea ecx, [ebp - 0x5b0]
push ecx
mov edx, dword [ebp + 0xc]
push edx
lea eax, [ebp - 0x568]
push eax
call fcn.10003d50
add esp, 0x24
mov dword [ebp - 0x7a0], eax
mov byte [ebp - 4], 2
lea ecx, [ebp - 0x5b0]
call fcn.10004f30
push str.replace
lea ecx, [ebp - 0x568]
push ecx
call fcn.10006360
add esp, 8
movzx edx, al
test edx, edx
jne 0x100042ee
push str.delete
lea eax, [ebp - 0x568]
push eax
call fcn.10006360
add esp, 8
movzx ecx, al
test ecx, ecx
je 0x100043bc
push 0x1007c4c0
mov ecx, dword [ebp + 0xc]
call fcn.1001cfd0
mov ecx, eax
call fcn.1001d700
movzx edx, al
test edx, edx
je 0x10004357
lea eax, [ebp - 0x628]
push eax
push str.i_key_columns
mov ecx, dword [ebp + 0xc]
call fcn.1001cfd0
mov ecx, eax
call fcn.1001b5e0
mov dword [ebp - 0x764], eax
mov ecx, dword [ebp - 0x724]
or ecx, 1
mov dword [ebp - 0x724], ecx
mov ecx, dword [ebp - 0x764]
call fcn.10004ce0
movzx edx, al
test edx, edx
jne 0x10004357
mov dword [ebp - 0x728], 0
jmp 0x10004361
mov dword [ebp - 0x728], 1
mov al, byte [ebp - 0x728]
mov byte [ebp - 0x71d], al
mov ecx, dword [ebp - 0x724]
and ecx, 1
je 0x1000438a
and dword [ebp - 0x724], 0xfffffffe
lea ecx, [ebp - 0x628]
call fcn.10004f30
movzx edx, byte [ebp - 0x71d]
test edx, edx
je 0x100043bc
mov dword [ebp - 0x768], 0
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x568]
call fcn.10004f30
mov eax, dword [ebp - 0x768]
jmp 0x100049c0
sub esp, 0x18
mov ecx, esp
mov dword [ebp - 0x79c], esp
mov eax, dword [ebp + 8]
push eax
call fcn.1001ad80
mov dword [ebp - 0x76c], eax
mov ecx, dword [ebp - 0x76c]
mov dword [ebp - 0x798], ecx
mov byte [ebp - 4], 3
push str.i_dt
mov ecx, dword [ebp + 0xc]
call fcn.1001cfd0
mov byte [ebp - 4], 2
mov ecx, eax
call fcn.1001b3b0
sub esp, 0x18
mov ecx, esp
mov dword [ebp - 0x794], esp
push 0x1008d588
call fcn.1001ad80
mov dword [ebp - 0x758], eax
mov edx, dword [ebp - 0x758]
mov dword [ebp - 0x7bc], edx
mov byte [ebp - 4], 4
push str.client_unique
mov ecx, dword [ebp + 0xc]
call fcn.1001cfd0
mov byte [ebp - 4], 2
mov ecx, eax
call fcn.1001b3b0
push 0x1007c4f8
mov ecx, dword [ebp + 0xc]
call fcn.1001cfd0
mov ecx, eax
call fcn.1001d320
movzx eax, al
test eax, eax
je 0x100045d8
lea ecx, [ebp - 0x71c]
call fcn.10003e20
mov byte [ebp - 4], 5
lea ecx, [ebp - 0x71c]
push ecx
call fcn.10006db0
add esp, 4
test eax, eax
je 0x10004526
lea ecx, [ebp - 0x71c]
call fcn.10004ce0
movzx edx, al
test edx, edx
jne 0x10004526
sub esp, 0x18
mov ecx, esp
mov dword [ebp - 0x7ac], esp
lea eax, [ebp - 0x71c]
push eax
call fcn.1001ae90
mov dword [ebp - 0x770], eax
mov ecx, dword [ebp - 0x770]
mov dword [ebp - 0x7b0], ecx
mov byte [ebp - 4], 6
push 0x1007c504
mov ecx, dword [ebp + 0xc]
call fcn.1001cfd0
mov byte [ebp - 4], 5
mov ecx, eax
call fcn.1001b3b0
sub esp, 0x18
mov ecx, esp
mov dword [ebp - 0x7b4], esp
push 1
call fcn.1001acc0
mov dword [ebp - 0x774], eax
mov edx, dword [ebp - 0x774]
mov dword [ebp - 0x7b8], edx
mov byte [ebp - 4], 7
push str.i_user_data
mov ecx, dword [ebp + 0xc]
call fcn.1001cfd0
mov byte [ebp - 4], 5
mov ecx, eax
call fcn.1001b3b0
jmp 0x100045c9
push 0x1008d480
lea ecx, [ebp - 0x598]
call fcn.10004e40
mov byte [ebp - 4], 8
lea eax, [ebp - 0x598]
push eax
lea ecx, [ebp - 0x688]
push ecx
call fcn.10003ba0
add esp, 8
mov dword [ebp - 0x778], eax
mov edx, dword [ebp - 0x778]
mov dword [ebp - 0x77c], edx
mov byte [ebp - 4], 9
sub esp, 0x18
mov ecx, esp
mov dword [ebp - 0x7c0], esp
mov eax, dword [ebp - 0x77c]
push eax
call fcn.1001ae90
mov dword [ebp - 0x780], eax
mov ecx, dword [ebp - 0x780]
mov dword [ebp - 0x7c4], ecx
mov byte [ebp - 4], 0xa
push str.user_name
mov ecx, dword [ebp + 0xc]
call fcn.1001cfd0
mov byte [ebp - 4], 9
mov ecx, eax
call fcn.1001b3b0
mov byte [ebp - 4], 8
lea ecx, [ebp - 0x688]
call fcn.10004f30
mov byte [ebp - 4], 5
lea ecx, [ebp - 0x598]
call fcn.10004d70
mov byte [ebp - 4], 2
lea ecx, [ebp - 0x71c]
call fcn.100049e0
push 0x1007c528
mov ecx, dword [ebp + 0xc]
call fcn.1001cfd0
mov ecx, eax
call fcn.1001d320
movzx edx, al
test edx, edx
je 0x100046ac
mov byte [ebp - 0x30], 0
xor eax, eax
mov dword [ebp - 0x2f], eax
mov dword [ebp - 0x2b], eax
mov dword [ebp - 0x27], eax
mov dword [ebp - 0x23], eax
mov dword [ebp - 0x1f], eax
mov dword [ebp - 0x1b], eax
mov dword [ebp - 0x17], eax
mov word [ebp - 0x13], ax
mov byte [ebp - 0x11], al
lea ecx, [ebp - 0x550]
push ecx
call dword [sym.imp.KERNEL32.dll_GetLocalTime]
movzx edx, word [ebp - 0x544]
push edx
movzx eax, word [ebp - 0x546]
push eax
movzx ecx, word [ebp - 0x548]
push ecx
movzx edx, word [ebp - 0x54a]
push edx
movzx eax, word [ebp - 0x54e]
push eax
movzx ecx, word [ebp - 0x550]
push ecx
push 0x1007c534
push 0x20
lea edx, [ebp - 0x30]
push edx
call dword [sym.imp.SHLWAPI.dll_wnsprintfA]
add esp, 0x24
sub esp, 0x18
mov ecx, esp
mov dword [ebp - 0x7c8], esp
lea eax, [ebp - 0x30]
push eax
call fcn.1001ad80
mov dword [ebp - 0x784], eax
mov ecx, dword [ebp - 0x784]
mov dword [ebp - 0x7cc], ecx
mov byte [ebp - 4], 0xb
push 0x1007c554
mov ecx, dword [ebp + 0xc]
call fcn.1001cfd0
mov byte [ebp - 4], 2
mov ecx, eax
call fcn.1001b3b0
cmp dword [ebp + 0x10], 0
je 0x1000499e
mov edx, dword [ebp + 0x10]
push edx
call dword [sym.imp.SHLWAPI.dll_PathFindFileNameW]
push eax
lea ecx, [ebp - 0x5c8]
call fcn.10004e40
mov byte [ebp - 4], 0xc
lea eax, [ebp - 0x5c8]
push eax
lea ecx, [ebp - 0x640]
push ecx
call fcn.10003ba0
add esp, 8
mov dword [ebp - 0x788], eax
mov edx, dword [ebp - 0x788]
mov dword [ebp - 0x72c], edx
mov byte [ebp - 4], 0xd
sub esp, 0x18
mov ecx, esp
mov dword [ebp - 0x7d0], esp
mov eax, dword [ebp - 0x72c]
push eax
call fcn.1001ae90
mov dword [ebp - 0x730], eax
mov ecx, dword [ebp - 0x730]
mov dword [ebp - 0x7d4], ecx
mov byte [ebp - 4], 0xe
push str.attach_name
mov ecx, dword [ebp + 0xc]
call fcn.1001cfd0
mov byte [ebp - 4], 0xd
mov ecx, eax
call fcn.1001b3b0
mov byte [ebp - 4], 0xc
lea ecx, [ebp - 0x640]
call fcn.10004f30
mov byte [ebp - 4], 2
lea ecx, [ebp - 0x5c8]
call fcn.10004d70
cmp dword [ebp + 0x14], 0
je 0x10004810
mov edx, dword [ebp + 0x10]
push edx
lea ecx, [ebp - 0x5e0]
call fcn.10004e40
mov byte [ebp - 4], 0xf
lea eax, [ebp - 0x5e0]
push eax
lea ecx, [ebp - 0x658]
push ecx
call fcn.10003ba0
add esp, 8
mov dword [ebp - 0x734], eax
mov edx, dword [ebp - 0x734]
mov dword [ebp - 0x738], edx
mov byte [ebp - 4], 0x10
sub esp, 0x18
mov ecx, esp
mov dword [ebp - 0x7d8], esp
mov eax, dword [ebp - 0x738]
push eax
call fcn.1001ae90
mov dword [ebp - 0x73c], eax
mov ecx, dword [ebp - 0x73c]
mov dword [ebp - 0x7dc], ecx
mov byte [ebp - 4], 0x11
push 0x1007c56c
mov ecx, dword [ebp + 0xc]
call fcn.1001cfd0
mov byte [ebp - 4], 0x10
mov ecx, eax
call fcn.1001b3b0
mov byte [ebp - 4], 0xf
lea ecx, [ebp - 0x658]
call fcn.10004f30
mov byte [ebp - 4], 2
lea ecx, [ebp - 0x5e0]
call fcn.10004d70
jmp 0x1000499e
xor edx, edx
mov word [ebp - 0x338], dx
push 0x206
push 0
lea eax, [ebp - 0x336]
push eax
call fcn.10051430
add esp, 0xc
push 0x104
lea ecx, [ebp - 0x338]
push ecx
call fcn.10003ec0
test eax, eax
jne 0x1000486b
mov dword [ebp - 0x740], 0
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x568]
call fcn.10004f30
mov eax, dword [ebp - 0x740]
jmp 0x100049c0
lea edx, [ebp - 0x338]
push edx
call fcn.1002f540
xor eax, eax
mov word [ebp - 0x540], ax
push 0x206
push 0
lea ecx, [ebp - 0x53e]
push ecx
call fcn.10051430
add esp, 0xc
push 0x104
lea edx, [ebp - 0x540]
push edx
call fcn.1002f870
lea eax, [ebp - 0x540]
push eax
lea ecx, [ebp - 0x338]
push ecx
call dword [sym.imp.SHLWAPI.dll_PathAppendW]
push 0
lea edx, [ebp - 0x338]
push edx
mov eax, dword [ebp + 0x10]
push eax
call dword [sym.imp.KERNEL32.dll_CopyFileW]
test eax, eax
jne 0x100048f9
mov dword [ebp - 0x744], 0
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x568]
call fcn.10004f30
mov eax, dword [ebp - 0x744]
jmp 0x100049c0
lea ecx, [ebp - 0x338]
push ecx
lea ecx, [ebp - 0x5f8]
call fcn.10004e40
mov byte [ebp - 4], 0x12
lea edx, [ebp - 0x5f8]
push edx
lea eax, [ebp - 0x670]
push eax
call fcn.10003ba0
add esp, 8
mov dword [ebp - 0x748], eax
mov ecx, dword [ebp - 0x748]
mov dword [ebp - 0x74c], ecx
mov byte [ebp - 4], 0x13
sub esp, 0x18
mov ecx, esp
mov dword [ebp - 0x78c], esp
mov edx, dword [ebp - 0x74c]
push edx
call fcn.1001ae90
mov dword [ebp - 0x750], eax
mov eax, dword [ebp - 0x750]
mov dword [ebp - 0x790], eax
mov byte [ebp - 4], 0x14
push str.attachment
mov ecx, dword [ebp + 0xc]
call fcn.1001cfd0
mov byte [ebp - 4], 0x13
mov ecx, eax
call fcn.1001b3b0
mov byte [ebp - 4], 0x12
lea ecx, [ebp - 0x670]
call fcn.10004f30
mov byte [ebp - 4], 2
lea ecx, [ebp - 0x5f8]
call fcn.10004d70
mov dword [ebp - 0x754], 1
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x568]
call fcn.10004f30
mov eax, dword [ebp - 0x754]
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.1004e421
mov esp, ebp
pop ebp
ret