Function at 0x406fb0
Capabilities:
Copy file
Enumerate files on windows
Resolve function by parsing pe exports

Disassembly:
sub esp, 0xba8
push ebx
push ebp
push esi
push edi
mov di, word [esp + 0xbc0]
xor ebp, ebp
movsx esi, di
push esi
push str.RSFunction__d_
push ebp
push str.CTermEngine.RSFunction
push 0x28
mov dword [esp + 0x2c], 0x64
call fcn.00408890
lea eax, [esi - 1]
add esp, 0x14
cmp eax, 9
ja case.0x406ff1.3
jmp dword [eax*4 + 0x4075c8]
mov ebx, dword [esp + 0xbc8]
test ebx, ebx
je case.0x406ff1.3
call fcn.0040afe1
mov esi, eax
test esi, esi
je case.0x406ff1.3
mov ax, word [esp + 0xbc4]
mov word [esp + 0x10], di
mov edi, dword [esp + 0xbbc]
push 0x3e8
lea ecx, [esp + 0x14]
push 4
push ecx
push edi
mov word [esp + 0x22], ax
call fcn.00408350
push 0x3e8
lea edx, [esp + 0x6c]
push 8
xor ebp, ebp
push edx
push edi
mov dword [esp + 0x78], 4
mov dword [esp + 0x7c], ebp
call fcn.00408350
lea eax, [esp + 0x50]
push 0x3e8
push eax
push esi
push edi
mov dword [esp + 0x60], ebp
call fcn.00407ff0
add esp, 0x30
cmp eax, ebp
jne 0x4070f7
push 0x41afa4
push ebx
call fcn.0040a861
mov edi, eax
add esp, 8
cmp edi, ebp
je 0x40710d
push esi
call fcn.0040af7d
mov al, byte [esi + 0xc]
mov bl, 0x10
add esp, 4
test bl, al
jne 0x4070da
push esi
push 0x400
lea ecx, [esp + 0x7c0]
push 1
push ecx
call fcn.00409c4c
add esp, 0x10
cmp eax, ebp
je 0x4070da
push edi
push eax
lea edx, [esp + 0x7c0]
push 1
push edx
call fcn.0040ae44
mov al, byte [esi + 0xc]
add esp, 0x10
test bl, al
je 0x4070a3
push edi
call fcn.00409bcf
add esp, 4
push esi
call fcn.00409bcf
add esp, 4
pop edi
pop esi
pop ebp
pop ebx
add esp, 0xba8
ret
push ebx
push str.RS_Upload__s__fail
push eax
push str.CTermEngine.RSFunction
push 0x28
call fcn.00408890
add esp, 0x14
push esi
call fcn.00409bcf
add esp, 4
pop edi
pop esi
pop ebp
pop ebx
add esp, 0xba8
ret
mov esi, dword [esp + 0xbc8]
push esi
push str.Download__s
push ebp
push str.RS_Function
push 0x14
call fcn.00408890
add esp, 0x14
cmp esi, ebp
je case.0x406ff1.3
push 0x41af74
push esi
call fcn.0040a861
mov esi, eax
add esp, 8
cmp esi, ebp
je case.0x406ff1.3
mov ax, word [esp + 0xbc4]
mov word [esp + 0x10], di
mov edi, dword [esp + 0xbbc]
push 0x3e8
lea ecx, [esp + 0x14]
push 4
push ecx
push edi
mov word [esp + 0x22], ax
call fcn.00408350
push 0x3e8
push 0
push esi
push edi
call fcn.00408540
push esi
call fcn.00409bcf
add esp, 0x24
pop edi
pop esi
pop ebp
pop ebx
add esp, 0xba8
ret
mov eax, dword [esp + 0xbc8]
cmp eax, ebp
je case.0x406ff1.3
lea edx, [esp + 0x34]
push edx
push eax
call fcn.00416d10
add esp, 8
cmp eax, 0xffffffff
je case.0x406ff1.3
push 1
push 0x28
mov dword [esp + 0x20], 0x28
call fcn.0040ab01
mov ebp, eax
mov ecx, 9
lea esi, [esp + 0x3c]
add esp, 8
lea edi, [ebp + 4]
mov dword [ebp], 0x24
rep movsd dword es:[edi], dword [esi]
jmp case.0x406ff1.3
push 1
push 0x108
mov dword [esp + 0x20], 0x108
call fcn.0040ab01
add esp, 8
mov ebp, eax
lea edi, [ebp + 4]
push 0x41e264
push str._s.._
push edi
call fcn.00409b2c
add esp, 0xc
push 0
push edi
push 0x104
push edi
call dword [sym.imp.KERNEL32.dll_GetFullPathNameA]
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
mov dword [ebp], ecx
jmp case.0x406ff1.3
mov eax, dword [esp + 0xbc8]
cmp eax, ebp
je case.0x406ff1.3
xor ecx, ecx
push eax
mov dword [esp + 0x21], ecx
mov byte [esp + 0x20], 0
mov dword [esp + 0x25], ecx
mov dword [esp + 0x14], ebp
mov dword [esp + 0x29], ecx
mov dword [esp + 0x2d], ecx
mov word [esp + 0x31], cx
mov byte [esp + 0x33], cl
call fcn.00411e16
mov edi, eax
push 0x41a330
push edi
call fcn.00409a38
add esp, 0xc
xor esi, esi
test eax, eax
je 0x4072db
test esi, esi
jne 0x4072b5
push 0x13
lea edx, [esp + 0x20]
push eax
push edx
call fcn.00409450
add esp, 0xc
jmp 0x4072c7
cmp esi, 1
jne 0x4072db
push eax
call fcn.0040954e
add esp, 4
mov dword [esp + 0x10], eax
push 0x41a330
push 0
inc esi
call fcn.00409a38
add esp, 8
test eax, eax
jne 0x40729f
push edi
call fcn.0040a19f
lea eax, [esp + 0x20]
add esp, 4
test eax, eax
je 0x40752b
lea edi, [esp + 0x1c]
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
dec ecx
je 0x40752b
xor ecx, ecx
lea edi, [esp + 0x1c]
mov dword [esp + 0x38], ecx
mov dword [esp + 0x34], eax
mov dword [esp + 0x3c], ecx
mov dword [esp + 0x40], ecx
mov dword [esp + 0x44], ecx
mov dword [esp + 0x48], ecx
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
dec ecx
cmp ecx, 0x11
je 0x407384
lea edx, [esp + 0x48]
lea eax, [esp + 0x44]
push edx
lea ecx, [esp + 0x44]
push eax
lea edx, [esp + 0x44]
push ecx
lea eax, [esp + 0x44]
push edx
lea ecx, [esp + 0x44]
push eax
push ecx
lea edx, [esp + 0x34]
push str._d__d__d__d__d__d
push edx
call fcn.0040ae10
add esp, 0x20
cmp eax, 6
je 0x407384
lea eax, [esp + 0x1c]
push eax
push str.Registration_fail__invalid_MAC_Address___s_
push 0
push str.RS_Function
push 0xa
call fcn.00408890
add esp, 0x14
jmp case.0x406ff1.3
lea ecx, [esp + 0x1c]
lea edx, [esp + 0x60]
push ecx
push 0x41e264
push str._s..Client_s_
push edx
call fcn.00409b2c
lea eax, [esp + 0x70]
push eax
call fcn.00409070
add esp, 0x14
test al, al
jne 0x4074a7
lea ecx, [esp + 0x60]
push ecx
call fcn.004090f0
add esp, 4
lea edx, [esp + 0x3a8]
push str.00_00_00_00_00_00
push 0x41e264
push str._s..Client_s_
push edx
call fcn.00409b2c
add esp, 0x10
lea eax, [esp + 0x3a8]
lea ecx, [esp + 0x5b0]
push eax
push str._s.
push ecx
call fcn.00409b2c
add esp, 0xc
lea edx, [esp + 0x268]
lea eax, [esp + 0x5b0]
push edx
push eax
call dword [sym.imp.KERNEL32.dll_FindFirstFileA]
mov esi, eax
test esi, esi
je case.0x406ff1.3
mov edi, dword [sym.imp.KERNEL32.dll_FindNextFileA]
lea ecx, [esp + 0x268]
push ecx
push esi
call edi
test eax, eax
je 0x4074a0
mov ebx, dword [sym.imp.KERNEL32.dll_CopyFileA]
lea edx, [esp + 0x294]
lea eax, [esp + 0x3a8]
push edx
push eax
lea ecx, [esp + 0x6bc]
push 0x41aefc
push ecx
call fcn.00409b2c
add esp, 0x10
lea edx, [esp + 0x294]
lea eax, [esp + 0x60]
lea ecx, [esp + 0x4ac]
push edx
push eax
push 0x41aefc
push ecx
call fcn.00409b2c
add esp, 0x10
lea edx, [esp + 0x4ac]
lea eax, [esp + 0x6b4]
push 0
push edx
push eax
call ebx
lea ecx, [esp + 0x268]
push ecx
push esi
call edi
test eax, eax
jne 0x407436
push esi
call dword [sym.imp.KERNEL32.dll_FindClose]
mov eax, dword [esp + 0x10]
push 0x41e264
cmp eax, 2
jne 0x4074c4
lea edx, [esp + 0x168]
push str._s..igmvtppc2003igmvt.exe
push edx
jmp 0x4074d1
lea eax, [esp + 0x168]
push str._s..igmvtwin32igmvt.exe
push eax
call fcn.00409b2c
add esp, 0xc
lea ecx, [esp + 0x164]
push 0
push ecx
call fcn.00411dd0
add esp, 8
test eax, eax
je 0x4074f6
push str.Registration_fail__base_igmvt.exe_not_found
jmp 0x407530
push 1
push 0x36
mov dword [esp + 0x20], 0x36
call fcn.0040ab01
mov ebp, eax
lea edx, [esp + 0x16c]
lea edi, [ebp + 4]
push edi
push edx
call fcn.004049d0
or ecx, 0xffffffff
xor eax, eax
add esp, 0x10
repne scasb al, byte es:[edi]
not ecx
mov dword [ebp], ecx
jmp case.0x406ff1.3
push str.Registration_fail__null_MAC_Address
push 0
push str.RS_Function
push 0xa
call fcn.00408890
add esp, 0x10
mov esi, dword [esp + 0xbbc]
mov ax, word [esp + 0xbc0]
mov cx, word [esp + 0xbc4]
push 0x3e8
lea edx, [esp + 0x18]
push 4
push edx
push esi
mov word [esp + 0x24], ax
mov word [esp + 0x26], cx
call fcn.00408350
add esp, 0x10
test ebp, ebp
je 0x4075a0
mov eax, dword [esp + 0x18]
push 0x3e8
push eax
push ebp
push esi
call fcn.00408350
push ebp
call fcn.0040a19f
add esp, 0x14
pop edi
pop esi
pop ebp
pop ebx
add esp, 0xba8
ret
push 0x3e8
lea ecx, [esp + 0x18]
push 4
push ecx
push esi
mov dword [esp + 0x24], 0
call fcn.00408350
add esp, 0x10
pop edi
pop esi
pop ebp
pop ebx
add esp, 0xba8
ret