Function at 0x401634
Capabilities:
Check if file exists
Create process on windows
Delete file
Get common file path
Query environment variable
Terminate process

Disassembly:
push ebp
lea ebp, [esp - 0xe38]
sub esp, 0xf50
mov eax, dword [section..data]
xor eax, ebp
mov dword [ebp + 0xe34], eax
mov eax, dword [ebp + 0xe44]
push ebx
xor ebx, ebx
inc ebx
push esi
push edi
mov dword [ebp + 0x7c], eax
cmp dword [ebp + 0xe40], ebx
jle 0x401688
mov eax, dword [eax + 4]
push str._help
push eax
call dword [sym.imp.MSVCR100.dll__mbsicmp]
pop ecx
pop ecx
test eax, eax
jne 0x401688
call fcn.00401588
push 0
call dword [sym.imp.MSVCR100.dll_exit]
cmp dword [ebp + 0xe40], 3
jge 0x40169a
call fcn.00401588
push 0xffffffffffffffff
jmp 0x401682
xor esi, esi
push esi
mov dword [ebp + 0x64], esi
mov dword [ebp + 0x74], esi
mov dword [ebp + 0x70], esi
mov dword [ebp + 0x68], esi
call dword [sym.imp.KERNEL32.dll_GetModuleHandleA]
mov edi, 0x104
push edi
mov dword [0x404020], eax
lea eax, [ebp + 0xd30]
push esi
push eax
call sub.MSVCR100.dll_memset
push edi
lea eax, [ebp + 0xb28]
push esi
push eax
call sub.MSVCR100.dll_memset
add esp, 0x18
mov dword [ebp + 0x78], ebx
cmp dword [ebp + 0xe40], ebx
jle 0x40190d
mov dword [ebp + 0x80], 2
mov eax, dword [ebp + 0x7c]
lea esi, [eax + ebx*4]
mov eax, dword [esi]
push str._clsid
push eax
call dword [sym.imp.MSVCR100.dll__mbsicmp]
pop ecx
pop ecx
test eax, eax
jne 0x40177e
mov eax, dword [ebp + 0xe40]
cmp dword [ebp + 0x80], eax
jge 0x40177e
inc dword [ebp + 0x78]
mov eax, dword [ebp + 0x7c]
mov ecx, dword [ebp + 0x78]
mov ebx, dword [eax + ecx*4]
inc dword [ebp + 0x80]
test ebx, ebx
je 0x401741
push ebx
call dword [sym.imp.KERNEL32.dll_lstrlenA]
lea esi, [eax + 1]
cmp esi, 0x3fffffff
jle 0x401745
xor eax, eax
jmp 0x401759
lea eax, [esi + esi]
call fcn.00401fe0
mov eax, esp
push 3
push esi
push ebx
push eax
call section..text
lea ecx, [ebp + 0x1c4]
push ecx
push eax
call dword [sym.imp.ole32.dll_CLSIDFromString]
test eax, eax
jne 0x40195c
mov ebx, dword [ebp + 0x78]
mov dword [ebp + 0x74], 1
jmp 0x4018f5
mov eax, dword [esi]
push str._out
push eax
call dword [sym.imp.MSVCR100.dll__mbsicmp]
pop ecx
pop ecx
test eax, eax
jne 0x4017ef
mov eax, dword [ebp + 0x80]
cmp eax, dword [ebp + 0xe40]
jge 0x4017ef
mov eax, dword [ebp + 0x7c]
inc ebx
mov eax, dword [eax + ebx*4]
inc dword [ebp + 0x80]
lea ecx, [ebp + 0x40c]
sub ecx, eax
mov dl, byte [eax]
mov byte [eax + ecx], dl
inc eax
test dl, dl
jne 0x4017b5
lea eax, [ebp + 0x84]
push eax
lea eax, [ebp + 0x40c]
push eax
call dword [sym.imp.KERNEL32.dll_FindFirstFileA]
cmp eax, 0xffffffff
je 0x401963
push eax
call dword [sym.imp.KERNEL32.dll_FindClose]
mov dword [ebp + 0x70], 1
jmp 0x4018f5
mov eax, dword [esi]
push 0x40329c
push eax
call dword [sym.imp.MSVCR100.dll__mbsicmp]
pop ecx
pop ecx
test eax, eax
jne 0x40180f
mov dword [ebp + 0x64], 1
jmp 0x4018f5
mov eax, dword [esi]
push str._icon
push eax
call dword [sym.imp.MSVCR100.dll__mbsicmp]
pop ecx
pop ecx
test eax, eax
jne 0x40187d
mov eax, dword [ebp + 0x80]
cmp eax, dword [ebp + 0xe40]
jge 0x40187d
mov eax, dword [ebp + 0x7c]
inc ebx
mov eax, dword [eax + ebx*4]
inc dword [ebp + 0x80]
lea ecx, [ebp + 0x510]
sub ecx, eax
mov dl, byte [eax]
mov byte [eax + ecx], dl
inc eax
test dl, dl
jne 0x401846
lea eax, [ebp + 0x84]
push eax
lea eax, [ebp + 0x510]
push eax
call dword [sym.imp.KERNEL32.dll_FindFirstFileA]
cmp eax, 0xffffffff
je 0x401967
push eax
call dword [sym.imp.KERNEL32.dll_FindClose]
mov dword [ebp + 0x68], 1
jmp 0x4018f5
cmp byte [ebp + 0xb28], 0
jne 0x4018d4
mov eax, dword [esi]
push str..jar
push eax
call dword [sym.imp.MSVCR100.dll__mbsstr]
pop ecx
pop ecx
test eax, eax
je 0x4018d4
mov esi, dword [esi]
lea ecx, [ebp + 0xb28]
sub ecx, esi
mov al, byte [esi]
mov byte [esi + ecx], al
inc esi
test al, al
jne 0x4018a4
lea eax, [ebp + 0x84]
push eax
lea eax, [ebp + 0xb28]
push eax
call dword [sym.imp.KERNEL32.dll_FindFirstFileA]
cmp eax, 0xffffffff
je 0x40196b
push eax
call dword [sym.imp.KERNEL32.dll_FindClose]
jmp 0x4018f5
cmp byte [ebp + 0xd30], 0
jne 0x40196f
mov esi, dword [esi]
lea ecx, [ebp + 0xd30]
sub ecx, esi
mov al, byte [esi]
mov byte [esi + ecx], al
inc esi
test al, al
jne 0x4018eb
inc ebx
inc dword [ebp + 0x80]
mov dword [ebp + 0x78], ebx
cmp ebx, dword [ebp + 0xe40]
jl 0x4016f1
xor esi, esi
cmp byte [ebp + 0xb28], 0
je 0x401f81
cmp byte [ebp + 0xd30], 0
je 0x401f81
cmp dword [ebp + 0x74], esi
je 0x401a17
lea eax, [ebp + 0x74]
push eax
lea eax, [ebp + 0x1c4]
push eax
call dword [sym.imp.ole32.dll_StringFromCLSID]
mov edi, dword [ebp + 0x74]
cmp edi, esi
je 0x401957
push edi
call dword [sym.imp.KERNEL32.dll_lstrlenW]
inc eax
cmp eax, 0x3fffffff
jle 0x40197f
mov dword [ebp + 0x40], esi
jmp 0x401998
push 0x64
call fcn.004010bd
push 0x66
jmp 0x40195e
push 0x67
jmp 0x40195e
push 0x68
jmp 0x40195e
mov eax, dword [ebp + 0x7c]
push dword [eax + ebx*4]
push 0x85
call fcn.00401108
lea esi, [eax + eax]
mov eax, esi
call fcn.00401fe0
mov eax, esp
push 3
push esi
push edi
push eax
call fcn.00401038
mov dword [ebp + 0x40], eax
push dword [ebp + 0x74]
call dword [sym.imp.ole32.dll_CoTaskMemFree]
mov dword [ebp + 0x7c], 1
lea ebx, [ebp + 0x1d4]
lea esi, [ebx - 0x10]
mov edi, ebx
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
lea eax, [ebp + 0x78]
push eax
movsd dword es:[edi], dword [esi]
inc dword [ebx]
push ebx
call dword [sym.imp.ole32.dll_StringFromCLSID]
mov edi, dword [ebp + 0x78]
test edi, edi
je 0x4019da
push edi
call dword [sym.imp.KERNEL32.dll_lstrlenW]
inc eax
cmp eax, 0x3fffffff
jle 0x4019de
xor eax, eax
jmp 0x4019f4
lea esi, [eax + eax]
mov eax, esi
call fcn.00401fe0
mov eax, esp
push 3
push esi
push edi
push eax
call fcn.00401038
mov ecx, dword [ebp + 0x7c]
push dword [ebp + 0x78]
mov dword [ebp + ecx*4 + 0x40], eax
call dword [sym.imp.ole32.dll_CoTaskMemFree]
inc dword [ebp + 0x7c]
add ebx, 0x10
cmp dword [ebp + 0x7c], 4
jl 0x4019ae
mov edi, 0x104
jmp 0x401a86
lea eax, [ebp + 0x1c4]
xor ebx, ebx
mov dword [ebp + 0x7c], eax
push dword [ebp + 0x7c]
call dword [sym.imp.ole32.dll_CoCreateGuid]
lea eax, [ebp + 0x74]
push eax
push dword [ebp + 0x7c]
call dword [sym.imp.ole32.dll_StringFromCLSID]
mov eax, dword [ebp + 0x74]
mov dword [ebp + 0x78], eax
cmp eax, esi
je 0x401a51
push eax
call dword [sym.imp.KERNEL32.dll_lstrlenW]
inc eax
cmp eax, 0x3fffffff
jle 0x401a55
xor eax, eax
jmp 0x401a6f
lea esi, [eax + eax]
mov eax, esi
call fcn.00401fe0
mov eax, esp
push 3
push esi
push dword [ebp + 0x78]
push eax
call fcn.00401038
xor esi, esi
push dword [ebp + 0x74]
mov dword [ebp + ebx*4 + 0x40], eax
call dword [sym.imp.ole32.dll_CoTaskMemFree]
add dword [ebp + 0x7c], 0x10
inc ebx
cmp ebx, 4
jl 0x401a22
push edi
lea eax, [ebp + 0x614]
push eax
push dword [0x404020]
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
mov esi, dword [sym.imp.KERNEL32.dll_GetShortPathNameA]
push edi
lea eax, [ebp + 0x614]
push eax
push eax
call esi
push 1
lea eax, [ebp + 0x718]
push eax
lea eax, [ebp + 0x614]
push eax
call fcn.00401070
push 0x2e
lea eax, [ebp + 0xa24]
push eax
lea eax, [ebp + 0xd30]
push eax
call fcn.0040119c
add esp, 0x18
cmp dword [ebp + 0x70], 0
jne 0x401b01
lea eax, [ebp + 0x204]
push eax
push edi
call dword [sym.imp.KERNEL32.dll_GetCurrentDirectoryA]
lea eax, [ebp + 0xa24]
push eax
lea eax, [ebp + 0x204]
push eax
push 0x4032b4
jmp 0x401b14
lea eax, [ebp + 0xa24]
push eax
lea eax, [ebp + 0x40c]
push eax
push str._s_s.dll
lea eax, [ebp + 0x920]
push eax
call dword [sym.imp.USER32.dll_wsprintfA]
add esp, 0x10
push 4
pop ebx
push edi
call sub.MSVCR100.dll_void____cdecl_operator_new___unsigned_int_
mov dword [ebp + ebx*4 + 0x40], eax
inc ebx
pop ecx
cmp ebx, 9
jl 0x401b27
mov edx, dword [ebp + 0x50]
lea eax, [ebp + 0xa24]
mov ecx, eax
sub edx, ecx
mov cl, byte [eax]
mov byte [eax + edx], cl
inc eax
test cl, cl
jne 0x401b45
mov edx, dword [ebp + 0x54]
lea eax, [ebp + 0xd30]
mov ecx, eax
sub edx, ecx
mov cl, byte [eax]
mov byte [eax + edx], cl
inc eax
test cl, cl
jne 0x401b5c
push dword [ebp + 0x58]
lea eax, [ebp + 0xb28]
push eax
call fcn.004011e6
pop ecx
pop ecx
lea eax, [ebp + 0xc2c]
push eax
push edi
call dword [sym.imp.KERNEL32.dll_GetTempPathA]
push edi
lea eax, [ebp + 0xc2c]
push eax
push eax
call esi
push edi
call sub.MSVCR100.dll_void____cdecl_operator_new___unsigned_int_
mov esi, dword [sym.imp.KERNEL32.dll_GetEnvironmentVariableA]
pop ecx
push edi
push eax
push 0x4032cc
mov dword [ebp + 0x80], eax
call esi
mov ebx, eax
test ebx, ebx
jne 0x401bbc
mov eax, dword [ebp + 0x80]
mov byte [eax], bl
jmp 0x401be2
cmp ebx, edi
jbe 0x401be2
push dword [ebp + 0x80]
call sub.MSVCR100.dll_void___cdecl_operator_delete___void__
push ebx
call sub.MSVCR100.dll_void____cdecl_operator_new___unsigned_int_
pop ecx
pop ecx
push ebx
push eax
push str.CLASSPATH
mov dword [ebp + 0x80], eax
call esi
lea eax, [ebp + 0x718]
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x401beb
sub eax, edx
mov esi, eax
lea eax, [ebp + 0xb28]
lea ecx, [eax + 1]
mov dl, byte [eax]
inc eax
test dl, dl
jne 0x401bff
sub eax, ecx
mov dword [ebp + 0x70], eax
mov eax, dword [ebp + 0x80]
lea ecx, [eax + 1]
mov dl, byte [eax]
inc eax
test dl, dl
jne 0x401c14
sub eax, ecx
mov ebx, eax
lea eax, [ebp + 0xd30]
lea ecx, [eax + 1]
mov dl, byte [eax]
inc eax
test dl, dl
jne 0x401c28
sub eax, ecx
mov edi, eax
lea eax, [ebp + 0xc2c]
lea ecx, [eax + 1]
mov dl, byte [eax]
inc eax
test dl, dl
jne 0x401c3c
sub eax, ecx
lea esi, [eax + esi*2 + 0x104]
add esi, edi
add esi, dword [ebp + 0x70]
add esi, ebx
xor ecx, ecx
mov eax, dword [ebp + ecx*4 + 0x40]
lea edi, [eax + 1]
mov dl, byte [eax]
inc eax
test dl, dl
jne 0x401c5c
sub eax, edi
add esi, eax
inc ecx
cmp ecx, 4
jl 0x401c55
push esi
call sub.MSVCR100.dll_void____cdecl_operator_new___unsigned_int_
push dword [ebp + 0x4c]
mov edi, eax
push dword [ebp + 0x48]
lea eax, [ebp + 0xc2c]
push dword [ebp + 0x44]
push dword [ebp + 0x40]
push eax
lea eax, [ebp + 0xd30]
push eax
push dword [ebp + 0x80]
lea eax, [ebp + 0xb28]
push eax
lea eax, [ebp + 0x718]
push eax
push eax
push str._s_binjava.exe__classpath__sjrelibplugin.jar___s____s_________sun.plugin.com.Packager__s__s__s__s__s__s
push esi
push edi
call dword [sym.imp.MSVCR100.dll__snprintf]
push 0x44
pop ebx
push ebx
xor esi, esi
lea eax, [ebp - 0x14]
push esi
push eax
call sub.MSVCR100.dll_memset
add esp, 0x44
lea eax, [ebp + 0x30]
push eax
lea eax, [ebp - 0x14]
push eax
push esi
push esi
push esi
push esi
push esi
push esi
push edi
push esi
mov dword [ebp - 0x14], ebx
call dword [sym.imp.KERNEL32.dll_CreateProcessA]
test eax, eax
jne 0x401ce8
push 0x6d
jmp 0x40195e
push 0xffffffffffffffff
push dword [ebp + 0x30]
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
push edi
call sub.MSVCR100.dll_void___cdecl_operator_delete___void__
push dword [ebp + 0x80]
call sub.MSVCR100.dll_void___cdecl_operator_delete___void__
pop ecx
pop ecx
lea eax, [ebp + 0x6c]
push eax
push dword [ebp + 0x30]
call dword [sym.imp.KERNEL32.dll_GetExitCodeProcess]
test eax, eax
je 0x401d24
cmp dword [ebp + 0x6c], esi
je 0x401d24
cmp dword [ebp + 0x6c], 0x65
je 0x401d2a
jmp 0x401ce1
cmp dword [ebp + 0x6c], 0x65
jne 0x401d3b
mov edi, dword [ebp + 0x5c]
mov esi, str.Both
movsd dword es:[edi], dword [esi]
movsb byte es:[edi], byte [esi]
mov esi, str.131873
jmp 0x401d4c
mov edi, dword [ebp + 0x5c]
mov esi, str.Apartment
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
movsw word es:[edi], word [esi]
mov esi, str.131473
mov edi, dword [ebp + 0x60]
movsd dword es:[edi], dword [esi]
movsw word es:[edi], word [esi]
movsb byte es:[edi], byte [esi]
push ebx
xor esi, esi
lea eax, [ebp - 0x14]
push esi
push eax
call sub.MSVCR100.dll_memset
mov edi, dword [sym.imp.USER32.dll_wsprintfA]
lea eax, [ebp + 0xa24]
push eax
lea eax, [ebp + 0xc2c]
push eax
lea eax, [ebp + 0x81c]
push str._s_s.idl
push eax
mov dword [ebp - 0x14], ebx
call edi
add esp, 0x1c
lea eax, [ebp + 0x84]
push eax
lea eax, [ebp + 0x81c]
push eax
call dword [sym.imp.KERNEL32.dll_FindFirstFileA]
cmp eax, 0xffffffff
jne 0x401da8
push 0x6e
jmp 0x40195e
push eax
call dword [sym.imp.KERNEL32.dll_FindClose]
lea eax, [ebp + 0xc2c]
lea ecx, [eax + 1]
mov dl, byte [eax]
inc eax
test dl, dl
jne 0x401db8
sub eax, ecx
mov ecx, eax
lea eax, [ebp + 0x81c]
lea edx, [eax + 1]
mov bl, byte [eax]
inc eax
test bl, bl
jne 0x401dcc
sub eax, edx
lea eax, [eax + ecx + 0x104]
push eax
call sub.MSVCR100.dll_void____cdecl_operator_new___unsigned_int_
mov ebx, eax
lea eax, [ebp + 0x81c]
push eax
lea eax, [ebp + 0xc2c]
push eax
push str.midl__nologo__out__s__s
push ebx
call edi
add esp, 0x14
lea eax, [ebp + 0x30]
push eax
lea eax, [ebp - 0x14]
push eax
push esi
push esi
push esi
push esi
push esi
push esi
push ebx
push esi
call dword [sym.imp.KERNEL32.dll_CreateProcessA]
test eax, eax
jne 0x401e30
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 2
jne 0x401e29
push 0x7d
jmp 0x40195e
push 0x6f
jmp 0x40195e
push 0xffffffffffffffff
push dword [ebp + 0x30]
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
push ebx
call sub.MSVCR100.dll_void___cdecl_operator_delete___void__
pop ecx
lea eax, [ebp + 0x6c]
push eax
push dword [ebp + 0x30]
call dword [sym.imp.KERNEL32.dll_GetExitCodeProcess]
test eax, eax
je 0x401e58
cmp dword [ebp + 0x6c], esi
jne 0x401e29
lea eax, [ebp + 0x718]
push eax
lea eax, [ebp + 0x308]
push str._s_binBeanreg.dll
push eax
call dword [sym.imp.USER32.dll_wsprintfA]
lea eax, [ebp + 0x920]
push eax
lea eax, [ebp + 0x308]
push eax
call fcn.00401234
add esp, 0x14
push esi
lea eax, [ebp + 0x920]
push eax
call dword [sym.imp.KERNEL32.dll_BeginUpdateResourceA]
mov ebx, eax
xor edi, edi
mov ecx, dword [ebp + edi*4 + 0x40]
mov eax, ecx
lea edx, [eax + 1]
mov dword [ebp + 0x70], edx
mov dl, byte [eax]
inc eax
test dl, dl
jne 0x401ea5
sub eax, dword [ebp + 0x70]
push eax
push ecx
lea eax, [edi + 0x12c]
push esi
movzx eax, ax
push eax
push 6
push ebx
call dword [sym.imp.KERNEL32.dll_UpdateResourceA]
test eax, eax
je 0x401f38
inc edi
cmp edi, 9
jl 0x401e99
push ebx
lea eax, [ebp + 0xa24]
push eax
lea eax, [ebp + 0xc2c]
push eax
call fcn.0040146c
push ebx
push dword [ebp + 0x68]
lea eax, [ebp + 0x510]
push eax
call fcn.0040138e
push ebx
lea eax, [ebp + 0x920]
push eax
lea eax, [ebp + 0xb28]
push eax
call fcn.004012f8
add esp, 0x24
push esi
push ebx
call dword [sym.imp.KERNEL32.dll_EndUpdateResourceA]
cmp dword [ebp + 0x64], esi
je 0x401f54
lea eax, [ebp + 0x920]
push eax
call dword [sym.imp.KERNEL32.dll_LoadLibraryA]
mov edi, eax
cmp edi, esi
jne 0x401f3f
lea eax, [ebp - 0x118]
push eax
push 0x74
jmp 0x40197a
push 0x70
jmp 0x40195e
push str.DllRegisterServer
push edi
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
call eax
push edi
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
lea eax, [ebp + 0x81c]
push eax
call dword [sym.imp.KERNEL32.dll_DeleteFileA]
xor eax, eax
lea esp, [ebp - 0x124]
pop edi
pop esi
pop ebx
mov ecx, dword [ebp + 0xe34]
xor ecx, ebp
call fcn.00401f8e
add ebp, 0xe38
leave
ret
push 0x69
jmp 0x40195e