Function at 0x402910
Capabilities:
Copy file
Create directory

Disassembly:
push ebp
mov ebp, esp
push edi
push esi
push ebx
sub esp, 0x58c
mov ebx, dword [ebp + 8]
test ebx, ebx
jne 0x402986
mov edx, dword [0x410ba8]
test edx, edx
je 0x402964
mov esi, dword [ebp + 0x14]
mov dword [esp], esi
call sub.msvcrt.dll_strlen
mov edx, dword [ebp + 0x14]
cmp byte [eax + edx - 1], 0x5c
je 0x402948
mov word [eax + edx], 0x5c
mov eax, str.binjava.exe
mov dword [esp + 4], eax
mov edi, dword [ebp + 0x14]
mov dword [esp], edi
call sub.msvcrt.dll_strcat
lea esp, [ebp - 0xc]
pop ebx
pop esi
pop edi
pop ebp
ret
mov ebx, dword [ebp + 0x14]
mov dword [esp], ebx
call sub.msvcrt.dll_strlen
mov edx, dword [ebp + 0x14]
cmp byte [eax + edx - 1], 0x5c
je 0x40297f
mov word [eax + edx], 0x5c
mov eax, str.binjavaw.exe
jmp 0x40294d
mov eax, dword [ebp + 0x14]
lea ebx, [ebp - 0x128]
mov dword [esp], ebx
mov dword [esp + 4], eax
call sub.msvcrt.dll_strcpy
mov dword [esp], ebx
call sub.msvcrt.dll_strlen
mov dword [eax + ebx], 0x75616c5c
mov ecx, 0x3468636e
mov edx, 0x6d742d6a
mov dword [eax + ebx + 4], ecx
mov ecx, ebx
mov dword [eax + ebx + 8], edx
mov word [eax + ebx + 0xc], 0x5c70
mov byte [eax + ebx + 0xe], 0
lea esi, [esi]
mov esi, dword [ecx]
add ecx, 4
lea edx, [esi - 0x1010101]
not esi
and edx, esi
mov eax, edx
and eax, 0x80808080
je 0x4029d0
and edx, 0x8080
jne 0x4029f6
shr eax, 0x10
add ecx, 2
add al, al
mov edi, 0x410c30
sbb ecx, 3
sub ecx, ebx
xor edx, edx
mov byte [ecx + ebp - 0x129], dl
mov dword [esp + 4], edi
mov dword [esp], ebx
call sub.msvcrt.dll__stat
test eax, eax
jne 0x402db3
mov dword [esp], ebx
call sub.msvcrt.dll_strlen
cmp byte [eax + ebx - 1], 0x5c
je 0x402a34
mov word [eax + ebx], 0x5c
mov dword [esp], ebx
mov esi, str..exe
mov edi, 0x3468636e
mov dword [esp + 4], esi
lea esi, [ebp - 0x238]
call sub.msvcrt.dll_strcat
mov eax, dword [ebp + 0x14]
mov dword [esp], esi
mov dword [esp + 4], eax
call sub.msvcrt.dll_strcpy
mov dword [esp], esi
call sub.msvcrt.dll_strlen
mov dword [eax + esi], 0x75616c5c
mov ecx, 0x6d742d6a
mov dword [eax + esi + 8], ecx
mov ecx, esi
mov dword [eax + esi + 4], edi
mov word [eax + esi + 0xc], 0x5c70
mov byte [eax + esi + 0xe], 0
lea esi, [esi]
mov edi, dword [ecx]
add ecx, 4
lea edx, [edi - 0x1010101]
not edi
and edx, edi
mov eax, edx
and eax, 0x80808080
je 0x402a90
and edx, 0x8080
jne 0x402ab6
shr eax, 0x10
add ecx, 2
mov dword [esp], ebx
lea edx, [ebp - 0x358]
add al, al
mov dword [esp + 4], edx
mov edi, ecx
sbb edi, 3
call sub.msvcrt.dll__findfirst
cmp eax, 0xffffffff
mov ebx, eax
jne 0x402b2e
jmp 0x402b93
mov dword [esp], esi
call sub.msvcrt.dll__unlink
mov dword [esp], esi
call sub.msvcrt.dll_strlen
mov dword [eax + esi], 0x6e616d2e
mov ecx, 0x73656669
mov dword [eax + esi + 4], ecx
mov word [eax + esi + 8], 0x74
mov eax, dword [0x410c20]
test eax, eax
jne 0x402b60
mov dword [esp], esi
call sub.msvcrt.dll__unlink
mov dword [esp], ebx
lea eax, [ebp - 0x358]
mov dword [esp + 4], eax
call sub.msvcrt.dll__findnext
test eax, eax
jne 0x402b93
mov dword [esp], edi
lea ecx, [ebp - 0x344]
mov dword [esp + 4], ecx
call sub.msvcrt.dll_strcpy
mov eax, dword [0x410c20]
test eax, eax
je 0x402ae0
mov dword [esp + 8], esi
mov edx, str.Unlink:_t_t_s_n
mov dword [esp + 4], edx
mov dword [esp], eax
call sub.msvcrt.dll_fprintf
jmp 0x402ae0
mov dword [esp + 8], esi
mov edx, str.Unlink:_t_t_s_n
mov dword [esp + 4], edx
mov dword [esp], eax
call sub.msvcrt.dll_fprintf
mov dword [esp], esi
call sub.msvcrt.dll__unlink
mov dword [esp], ebx
lea eax, [ebp - 0x358]
mov dword [esp + 4], eax
call sub.msvcrt.dll__findnext
test eax, eax
je 0x402b2e
mov dword [esp], ebx
call sub.msvcrt.dll__findclose
mov eax, dword [ebp + 0x14]
lea edi, [ebp - 0x468]
mov dword [esp], edi
mov dword [esp + 4], eax
call sub.msvcrt.dll_strcpy
mov edx, dword [0x410ba8]
test edx, edx
je 0x402d90
mov dword [esp], edi
call sub.msvcrt.dll_strlen
cmp byte [eax + edi - 1], 0x5c
je 0x402bd3
mov word [eax + edi], 0x5c
mov ebx, str.binjava.exe
mov dword [esp + 4], ebx
mov dword [esp], edi
mov ebx, 0x3468636e
call sub.msvcrt.dll_strcat
mov eax, dword [ebp + 0x14]
mov dword [esp], esi
mov dword [esp + 4], eax
call sub.msvcrt.dll_strcpy
mov dword [esp], esi
call sub.msvcrt.dll_strlen
mov dword [eax + esi], 0x75616c5c
mov edx, 0x6d742d6a
mov ecx, esi
mov dword [eax + esi + 4], ebx
mov dword [eax + esi + 8], edx
mov word [eax + esi + 0xc], 0x5c70
mov byte [eax + esi + 0xe], 0
lea esi, [esi]
lea edi, [edi]
mov ebx, dword [ecx]
add ecx, 4
lea edx, [ebx - 0x1010101]
not ebx
and edx, ebx
mov eax, edx
and eax, 0x80808080
je 0x402c30
and edx, 0x8080
jne 0x402c56
shr eax, 0x10
add ecx, 2
add al, al
mov eax, dword [ebp + 0x10]
mov edx, 0x104
sbb ecx, 3
mov dword [ebp - 0x57c], ecx
mov ecx, dword [ebp + 0xc]
lea ebx, [ecx + eax + 1]
mov dword [ebp - 0x580], ebx
xor ecx, ecx
lea ebx, [ebp - 0x578]
mov dword [esp + 8], edx
mov dword [esp + 4], ecx
mov dword [esp], ebx
call sub.msvcrt.dll_memset
mov eax, dword [ebp + 0xc]
mov dword [esp], ebx
mov dword [esp + 4], eax
call sub.msvcrt.dll_strcpy
mov dword [esp], ebx
call sub.msvcrt.dll_strlen
mov dword [eax + ebx], 0x6e616d2e
mov edx, 0x73656669
mov ecx, 0x410c30
mov dword [eax + ebx + 4], edx
mov word [eax + ebx + 8], 0x74
mov dword [esp + 4], ecx
mov dword [esp], ebx
call sub.msvcrt.dll__stat
test eax, eax
je 0x402e12
mov eax, dword [ebp - 0x580]
mov dword [esp + 4], eax
mov ebx, dword [ebp - 0x57c]
mov dword [esp], ebx
call sub.msvcrt.dll_strcpy
mov eax, dword [0x410c20]
test eax, eax
jne 0x402df4
mov dword [esp + 4], esi
xor edx, edx
mov dword [esp + 8], edx
mov dword [esp], edi
call sub.KERNEL32.dll_CopyFileA
sub esp, 0xc
test eax, eax
je 0x402d2a
mov dword [esp + 4], esi
mov esi, dword [ebp + 0x14]
mov dword [esp], esi
call sub.msvcrt.dll_strcpy
lea esp, [ebp - 0xc]
pop ebx
pop esi
pop edi
pop ebp
ret
mov dword [esp], edi
mov ebx, 0x410c30
mov dword [esp + 4], ebx
call sub.msvcrt.dll__stat
test eax, eax
jne 0x402923
mov edi, 0x410c30
mov ebx, dword [0x410c44]
mov dword [esp + 4], edi
mov dword [esp], esi
call sub.msvcrt.dll__stat
test eax, eax
jne 0x402923
cmp dword [0x410c44], ebx
jne 0x402923
mov eax, dword [0x410c20]
test eax, eax
jne 0x402eab
mov dword [esp + 4], esi
mov eax, dword [ebp + 0x14]
mov dword [esp], eax
call sub.msvcrt.dll_strcpy
jmp 0x402d22
mov dword [esp], edi
call sub.msvcrt.dll_strlen
cmp byte [eax + edi - 1], 0x5c
je 0x402da5
mov word [eax + edi], 0x5c
mov ecx, str.binjavaw.exe
mov dword [esp + 4], ecx
jmp 0x402bdc
mov dword [esp], ebx
lea esi, [ebp - 0x238]
call sub.msvcrt.dll__mkdir
test eax, eax
je 0x402b9b
mov eax, dword [0x410c20]
test eax, eax
jne 0x402e91
mov esi, dword [0x410ba8]
test esi, esi
je 0x402e81
mov edi, dword [ebp + 0x14]
mov dword [esp], edi
call sub.msvcrt.dll_strlen
jmp 0x402938
mov dword [esp + 0xc], esi
mov ecx, str.Copy:_t_t_s_____s_n
mov dword [esp + 8], edi
mov dword [esp + 4], ecx
mov dword [esp], eax
call sub.msvcrt.dll_fprintf
jmp 0x402cfa
mov eax, dword [ebp - 0x580]
mov dword [esp], esi
mov dword [esp + 4], eax
call sub.msvcrt.dll_strcat
mov dword [esp], esi
call sub.msvcrt.dll_strlen
mov dword [eax + esi], 0x6e616d2e
mov edx, 0x73656669
mov dword [eax + esi + 4], edx
mov word [eax + esi + 8], 0x74
mov eax, dword [0x410c20]
test eax, eax
jne 0x402e66
mov dword [esp + 4], esi
xor edx, edx
mov dword [esp + 8], edx
mov dword [esp], ebx
call sub.KERNEL32.dll_CopyFileA
sub esp, 0xc
jmp 0x402cd5
mov dword [esp + 0xc], esi
mov ecx, str.Copy:_t_t_s_____s_n
mov dword [esp + 8], ebx
mov dword [esp + 4], ecx
mov dword [esp], eax
call sub.msvcrt.dll_fprintf
jmp 0x402e4c
mov ecx, dword [ebp + 0x14]
mov dword [esp], ecx
call sub.msvcrt.dll_strlen
jmp 0x40296f
mov dword [esp + 8], ebx
mov ebx, str.Mkdir_failed:_t_s_n
mov dword [esp + 4], ebx
mov dword [esp], eax
call sub.msvcrt.dll_fprintf
jmp 0x402dd6
mov dword [esp + 8], esi
mov ecx, str.Reusing:_t_t_s_n
mov dword [esp + 4], ecx
mov dword [esp], eax
call sub.msvcrt.dll_fprintf
jmp 0x402d7b