Function at 0x405289
Capabilities:
Accept command line arguments
Check mutex on windows

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x28c
cmp dword [0x41ebf4], 7
push ebx
push esi
push edi
push 5
pop eax
jl 0x4052a9
mov eax, 0xc005
mov dword [esp + 0x54], eax
lea eax, [esp + 0x50]
push eax
mov dword [esp + 0x54], 8
call dword [0x41700c]
push str.REG_BAK_RESTORE_MUTEX_2008
push 1
xor edi, edi
push edi
call dword [0x41708c]
mov ebx, eax
call dword [0x417218]
mov esi, eax
sub esi, 0xb7
neg esi
sbb esi, esi
inc esi
cmp ebx, edi
je 0x4052f0
push ebx
call dword [0x417090]
cmp esi, edi
jne 0x4059c0
cmp dword [0x41ebf4], 6
jge 0x40531a
push 0x40
push ecx
mov eax, esp
mov dword [eax], 0x80
push ecx
mov eax, esp
mov dword [eax], str.This_application_needs_Windows_2000_or_later.
jmp 0x4059b7
xor eax, eax
push 0x419f0c
inc eax
call fcn.0040934b
pop ecx
test eax, eax
je 0x4059a3
xor eax, eax
push 0x419f30
inc eax
call fcn.0040934b
pop ecx
test eax, eax
je 0x4059a3
push 2
push edi
call dword [0x4173d0]
call fcn.00406803
mov dword [esp + 0x50], eax
lea eax, [esp + 0x5c]
push eax
call fcn.0040d122
mov dword [esp + 0x5c], eax
pop ecx
mov eax, 0x41ec38
call fcn.004085d7
push dword [ebp + 0x10]
mov ebx, dword [0x4171f8]
call ebx
test eax, eax
jle 0x405899
mov eax, dword [0x41dddc]
mov ecx, 0x41dddc
mov dword [esp + 0x10], edi
mov dword [esp + 0x2c], edi
mov dword [esp + 0x1c], edi
mov dword [esp + 0x30], edi
mov dword [esp + 0x40], 0x1e
mov dword [esp + 0x48], 0xa
call dword [eax + 0xc]
add eax, 0x10
mov dword [esp + 0x34], eax
lea eax, [esp + 0x4c]
push eax
call dword [0x417094]
push eax
call dword [0x417244]
mov dword [esp + 0x14], eax
cmp eax, edi
je 0x405706
push dword [eax + 4]
lea eax, [esp + 0x38]
push eax
call fcn.004030f8
push 2
pop eax
cmp dword [esp + 0x4c], eax
mov dword [esp + 0x28], eax
jle 0x4056f6
mov eax, dword [esp + 0x14]
mov ecx, dword [esp + 0x28]
mov edi, str._reg:
push edi
lea esi, [eax + ecx*4]
call ebx
push edi
push dword [esi]
mov edi, eax
call fcn.0040c9df
pop ecx
pop ecx
test eax, eax
jne 0x405503
mov edi, dword [esi]
lea esi, [esp + 0x24]
call fcn.00403083
push str._reg:
call ebx
mov edx, dword [esp + 0x24]
mov ecx, dword [edx - 0xc]
mov edi, ecx
sub edi, eax
mov esi, eax
test eax, eax
jge 0x405440
xor esi, esi
test edi, edi
jge 0x405446
xor edi, edi
mov eax, 0x7fffffff
sub eax, esi
cmp eax, edi
jl 0x405795
lea eax, [esi + edi]
cmp eax, ecx
jle 0x405460
mov edi, ecx
sub edi, esi
cmp esi, ecx
jle 0x405466
xor edi, edi
test esi, esi
jne 0x40547f
cmp edi, ecx
jne 0x40547f
lea eax, [edx - 0x10]
call fcn.004037c8
add eax, 0x10
mov dword [esp + 0x44], eax
jmp 0x40549b
lea eax, [esp + 0x24]
call fcn.004035cf
mov ecx, dword [esp + 0x24]
lea ecx, [ecx + esi*2]
push ecx
mov ecx, eax
lea esi, [esp + 0x48]
call fcn.0040357b
lea eax, [esp + 0x44]
lea edi, [esp + 0x24]
call fcn.004030b7
mov eax, dword [esp + 0x44]
add eax, 0xfffffff0
call fcn.00404aac
mov esi, dword [esp + 0x24]
push 0x419f94
mov eax, esi
call fcn.004067c2
pop ecx
test eax, eax
je 0x4054ce
or dword [esp + 0x10], 1
push 0x419f9c
mov eax, esi
call fcn.004067c2
pop ecx
test eax, eax
je 0x4054e4
or dword [esp + 0x10], 2
push 0x419fa4
mov eax, esi
call fcn.004067c2
pop ecx
test eax, eax
je 0x4056da
or dword [esp + 0x10], 4
jmp 0x4056da
mov edi, dword [0x41703c]
push str._silent
push dword [esi]
call edi
test eax, eax
jne 0x405523
mov dword [esp + 0x2c], 1
jmp 0x4056e2
push str._overwrite
push dword [esi]
call edi
test eax, eax
jne 0x40553d
mov dword [esp + 0x1c], 1
jmp 0x4056e2
mov edi, str._limitdays:
push edi
call ebx
push edi
push dword [esi]
mov edi, eax
call fcn.0040c9df
pop ecx
pop ecx
test eax, eax
jne 0x40560e
mov edi, dword [esi]
lea esi, [esp + 0x18]
mov dword [esp + 0x30], 1
call fcn.00403083
push str._limitdays:
call ebx
mov edx, dword [esp + 0x18]
mov ecx, dword [edx - 0xc]
mov edi, ecx
sub edi, eax
mov esi, eax
test eax, eax
jge 0x405586
xor esi, esi
test edi, edi
jge 0x40558c
xor edi, edi
mov eax, 0x7fffffff
sub eax, esi
cmp eax, edi
jl 0x405795
lea eax, [esi + edi]
cmp eax, ecx
jle 0x4055a6
mov edi, ecx
sub edi, esi
cmp esi, ecx
jle 0x4055ac
xor edi, edi
test esi, esi
jne 0x4055c5
cmp edi, ecx
jne 0x4055c5
lea eax, [edx - 0x10]
call fcn.004037c8
add eax, 0x10
mov dword [esp + 0x3c], eax
jmp 0x4055e1
lea eax, [esp + 0x18]
call fcn.004035cf
mov ecx, dword [esp + 0x18]
lea ecx, [ecx + esi*2]
push ecx
mov ecx, eax
lea esi, [esp + 0x40]
call fcn.0040357b
lea eax, [esp + 0x3c]
lea edi, [esp + 0x18]
call fcn.004030b7
mov eax, dword [esp + 0x3c]
add eax, 0xfffffff0
call fcn.00404aac
mov esi, dword [esp + 0x18]
mov edx, esi
call fcn.0040526b
mov dword [esp + 0x40], eax
jmp 0x4056da
mov edi, str._limitcount:
push edi
call ebx
push edi
push dword [esi]
mov edi, eax
call fcn.0040c9df
pop ecx
pop ecx
test eax, eax
jne 0x4056e2
mov edi, dword [esi]
lea esi, [esp + 0x20]
mov dword [esp + 0x30], 2
call fcn.00403083
push str._limitcount:
call ebx
mov edx, dword [esp + 0x20]
mov ecx, dword [edx - 0xc]
mov edi, ecx
sub edi, eax
mov esi, eax
test eax, eax
jge 0x405657
xor esi, esi
test edi, edi
jge 0x40565d
xor edi, edi
mov eax, 0x7fffffff
sub eax, esi
cmp eax, edi
jl 0x405795
lea eax, [esi + edi]
cmp eax, ecx
jle 0x405677
mov edi, ecx
sub edi, esi
cmp esi, ecx
jle 0x40567d
xor edi, edi
test esi, esi
jne 0x405696
cmp edi, ecx
jne 0x405696
lea eax, [edx - 0x10]
call fcn.004037c8
add eax, 0x10
mov dword [esp + 0x38], eax
jmp 0x4056b2
lea eax, [esp + 0x20]
call fcn.004035cf
mov ecx, dword [esp + 0x20]
lea ecx, [ecx + esi*2]
push ecx
mov ecx, eax
lea esi, [esp + 0x3c]
call fcn.0040357b
lea eax, [esp + 0x38]
lea edi, [esp + 0x20]
call fcn.004030b7
mov eax, dword [esp + 0x38]
add eax, 0xfffffff0
call fcn.00404aac
mov esi, dword [esp + 0x20]
mov edx, esi
call fcn.0040526b
mov dword [esp + 0x48], eax
lea eax, [esi - 0x10]
call fcn.00404aac
inc dword [esp + 0x28]
mov eax, dword [esp + 0x28]
cmp eax, dword [esp + 0x4c]
jl 0x4053f4
xor edi, edi
push dword [esp + 0x14]
call dword [0x417064]
cmp dword [esp + 0x2c], edi
jne 0x40572c
call fcn.0040d0cb
test eax, eax
je 0x40572c
push 0x40
push ecx
mov eax, esp
push ecx
mov dword [eax], 0x80
mov eax, esp
push edi
mov dword [eax], 0x41a008
call fcn.00404861
add esp, 0x10
mov eax, dword [0x41dddc]
mov ecx, 0x41dddc
call dword [eax + 0xc]
mov ebx, dword [esp + 0x34]
add eax, 0x10
mov dword [esp + 0x14], eax
lea eax, [esp + 0x14]
push eax
push ecx
add ebx, 0xfffffff0
mov eax, ebx
mov esi, esp
call fcn.004037c8
add eax, 0x10
push 0x41ec38
mov dword [esi], eax
call fcn.004088d3
cmp eax, edi
jne 0x40579f
cmp dword [esp + 0x2c], edi
jne 0x405881
push 0x30
push ecx
mov eax, esp
push ecx
mov dword [eax], 0x80
mov eax, esp
push edi
mov dword [eax], 0x419638
call fcn.00404861
add esp, 0x10
jmp 0x405881
push 0x80070057
call fcn.00404c03
lea eax, [esp + 0x14]
mov edi, 0x41ecf4
call fcn.004030b7
mov eax, dword [esp + 0x1c]
mov dword [0x41ed18], eax
lea esi, [esp + 0x48]
lea ecx, [esp + 0x40]
lea eax, [esp + 0x30]
call fcn.00401086
mov eax, dword [esp + 0x30]
mov dword [0x41ed1c], eax
mov eax, dword [esp + 0x40]
mov dword [0x41ed20], eax
mov eax, dword [esp + 0x48]
mov dword [0x41ed24], eax
mov eax, dword [esp + 0x10]
mov dword [0x41ed0c], 3
test eax, eax
je 0x4057f9
mov dword [0x41ed0c], eax
push 1
xor eax, eax
mov ecx, 0x41ec38
call fcn.00409086
cmp dword [0x41ef4c], 0
je 0x40587f
cmp dword [esp + 0x2c], 0
jne 0x40587f
mov eax, dword [0x41dddc]
mov ecx, 0x41dddc
call dword [eax + 0xc]
add eax, 0x10
mov dword [esp + 0x1c], eax
mov eax, dword [0x41ef48]
lea ecx, [esp + 0x34]
call fcn.004013e9
push dword [eax]
lea eax, [esp + 0x20]
push 0x41a068
push eax
call fcn.0040389f
mov eax, dword [esp + 0x40]
add esp, 0xc
add eax, 0xfffffff0
call fcn.00404aac
mov esi, dword [esp + 0x1c]
push 0x30
push ecx
mov eax, esp
push ecx
mov dword [eax], 0x80
mov eax, esp
push 0
mov dword [eax], esi
call fcn.00404861
add esp, 0x10
lea eax, [esi - 0x10]
call fcn.00404aac
xor edi, edi
mov eax, dword [esp + 0x14]
add eax, 0xfffffff0
call fcn.00404aac
mov eax, ebx
call fcn.00404aac
jmp 0x405966
push ecx
mov eax, esp
lea ebx, [esp + 0x64]
mov dword [eax], 0x41a0c8
call fcn.0040515a
call dword [0x417374]
and dword [esp + 0x88], 0xfffffbff
cmp dword [esp + 0x8c], edi
jne 0x4058cc
mov dword [esp + 0x8c], eax
mov eax, dword [esp + 0xb8]
mov dword [esp + 0xa4], eax
mov eax, dword [esp + 0xbc]
mov dword [esp + 0x9c], eax
lea eax, [esp + 0x60]
lea esi, [esp + 0x68]
call fcn.00403d19
lea eax, [esp + 0x84]
push eax
call dword [0x417004]
mov dword [esp + 0x9c], edi
mov dword [esp + 0xa4], edi
cmp dword [esp + 0xb8], edi
je 0x40592e
push dword [esp + 0xb8]
call fcn.0040de46
pop ecx
mov dword [esp + 0xb8], edi
mov dword [esp + 0xbc], edi
mov dword [esp + 0xc0], edi
cmp dword [esp + 0x244], edi
je 0x405951
push dword [esp + 0x244]
call fcn.0040d799
lea eax, [esp + 0xc4]
call fcn.00404f59
lea eax, [esp + 0x60]
call fcn.00405a43
cmp dword [esp + 0x58], edi
je 0x405977
lea eax, [esp + 0x5c]
push eax
call fcn.0040d16c
pop ecx
call fcn.00406735
call dword [0x4173e4]
push 0x419f0c
xor eax, eax
call fcn.0040934b
xor eax, eax
mov dword [esp], 0x419f30
call fcn.0040934b
mov eax, dword [esp + 0x54]
pop ecx
jmp 0x4059c2
push 0x40
push ecx
mov eax, esp
mov dword [eax], 0x80
push ecx
mov eax, esp
mov dword [eax], 0x419f58
push edi
call fcn.00404861
add esp, 0x10
xor eax, eax
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0x10